-
Notifications
You must be signed in to change notification settings - Fork 352
HTTP: Refactoring nxt_h1p_peer_header_send() #1214
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Zhidao,
Previously, proxy request was constructed based on the
r->target
field. However, r->target will remain unchanged in the future,
even in cases of URL rewriting.
To accommodate this, I refactored the handling of the proxy target.
This doesn't really tell me why r->target
remaining unchanged will be an issue.
Hi Andrew, |
Yes, but I'm more asking why it remaining unchanged will be an issue |
There is no issue currently for proxy. Ideally, the To make it short, the About the quoted_target, take the following as an example.
|
Right this is what I was after. So, the proxy needs to see the re-written URL... gotcha. That's a key bit of information missing from the commit message, please |
OK, so quoted_target means percent_encoded. It's just badly named. |
Hmm, this seems to be doing a lot more than just a refactoring. It seems If there isn't any actual refactoring going on, then the commit message |
I think it's just a refactoring patch, there are no functional changes introduced.
Makes sense, added. Btw, I'm thinking about separating quoted_target related code into a new commit. |
6ed16ec
to
358bce8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
EDIT: This is in relation to HTTP: Introduce quoted target marker in HTTP parsing
Perhaps a bit of text in the commit message about why we need this now and we didn't need it before...
But it's making use of the |
358bce8
to
4e4f986
Compare
I don't know exactly why, because this part of the code was commented out, probably because it wasn't needed at the time. |
I split it into two commits, for the first one, maybe it's a code change rather than refactoring. |
4e4f986
to
95727a1
Compare
For me the second patch ((HTTP: Refactoring nxt_h1p_peer_header_send()](95727a1)) is not a refactoring. I would either split it up to do the refactor bit, i.e without the We didn't use Or just admit it isn't a refactor and adjust the commit message... |
The quoted_target field is to indentify URLs containing percent-encoded characters. It can be used in places where you might need to generate new URL, such as in the proxy module. It will be used in the subsequent commit.
Previously, proxy request was constructed based on the `r->target` field. However, r->target will remain unchanged in the future, even in cases of URL rewriting because of the requirement change for $request_uri that will be changed to constant. To accommodate this, the r->target should be designed to be constant, but Unit needs to pass a changeable URL to the upstream server. Based on the above, the proxy module can't depend on r->target.
95727a1
to
a4dbee1
Compare
Ok, the same for the first one. Removed "No functional changes". |
Previously, proxy request was constructed based on the
r->target
field. However, r->target will remain unchanged in the future, even in cases of URL rewriting.To accommodate this, I refactored the handling of the proxy target.