Skip to content
This repository has been archived by the owner on Apr 26, 2023. It is now read-only.

Forward request headers #175

Closed
jwoyame opened this issue Dec 10, 2014 · 7 comments
Closed

Forward request headers #175

jwoyame opened this issue Dec 10, 2014 · 7 comments

Comments

@jwoyame
Copy link
Contributor

jwoyame commented Dec 10, 2014

To behave more like a "true" HTTP proxy, the scripts could forward all request headers from the browser which are not explicitly set by the script itself.

This would enable features such as:

  • "If Modified" requests
  • Partial range requests
  • Cookies
  • Better request logging on the destination server (e.g. User-Agent)

It would also help to prevent unforeseen issues and bugs, such as the (fixed) issue where PDF files could not be proxied due to the "Range" header getting dropped by the proxy.

@bsvensson
Copy link
Member

I think this is similar to what we added for JSP recently: #164 and I think this is how all three proxies should behave.

@jwoyame
Copy link
Contributor Author

jwoyame commented Dec 10, 2014

The "copyHeaders" function of the DotNet proxy will copy the original response headers to the final response. Doing the same for the request headers seems to make sense. I would be willing to tackle this enhancement for the DotNet version if needed.

@bsvensson
Copy link
Member

Thanks @jwoyame that would be great if you could "tackle" the DotNet for this. Meanwhile I've merged in #174 even though I assume that will become irrelevant once this get implemented.

@jwoyame
Copy link
Contributor Author

jwoyame commented Dec 10, 2014

Okay! You are right, #174 is not a good permanent solution.

jwoyame added a commit to jwoyame/resource-proxy that referenced this issue Jan 10, 2015
@cheetah90
Copy link
Contributor

I think now we are forwarding all the headers from the client request. Right? @bsvensson

@jwoyame
Copy link
Contributor Author

jwoyame commented May 14, 2016

I implemented the upgrade in the unaccepted pull request #186, the issue is still worth review. Headers are copied for responses but not for requests.

@bsvensson
Copy link
Member

This has been fixed and merged - see #433.

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

No branches or pull requests

3 participants