Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SESSION_CONTEXT('LOCALE')/SESSION_CONTEXT('LOCALE_SAP')/$.request.language is empty on serverside #15

Open
DerGuteWolf opened this issue Feb 7, 2016 · 3 comments

Comments

@DerGuteWolf
Copy link

Please add

  if(proxyreq.headers['accept-language'] != undefined) {
    headers['Accept-Language'] = proxyreq.headers['accept-language'];
  }

to server-basic-auth.js

@DerGuteWolf DerGuteWolf changed the title SESSION_CONTEXT('LOCALE')/SESSION_CONTEXT('LOCALE_SAP') is empty on serverside SESSION_CONTEXT('LOCALE')/SESSION_CONTEXT('LOCALE_SAP')/$.request.language is empty on serverside Feb 7, 2016
@gregorwolf
Copy link
Owner

Please give it a try.

@DerGuteWolf
Copy link
Author

I already tested this on my installation before opening the issue ;-), so, yes, this works.
What would be nice, but does not seem to be necessary is

        if(res.headers['content-language'] != undefined) { 
          proxyres.setHeader("content-language",  res.headers['content-language']);
        }

before

        proxyres.statusCode = res.statusCode;

What might also be better for performace, is preserving the "Accept-Encoding" header, but there seems further problems with this, I think at first the response header "content-encoding" is not preserved, thus giving illegible results (HANA sends gzip). But also the SAML form detection does not seem to work reliable when preserving this header.

@gregorwolf
Copy link
Owner

Can you please fork, make the adjustments and then I merge the changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants