-
Notifications
You must be signed in to change notification settings - Fork 5
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
Add tests for chunked modifications #164
Conversation
98ec023
to
8920a8a
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.
If I understood correctly, there are no tests for h2 clients and responses with trailing headers.
class RemoveChunked(tester.TempestaTest): | ||
"""Remodve chunked encoding from http/1 responses and correctly frame them | ||
as h2 messages. Currently we have no good checker for http2 as deproxy, | ||
just cun curl and see if it's happy with the received response. |
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.
just cun curl and see if it's happy with the received response. | |
just run curl and see if it's happy with the received response. |
""" | ||
|
||
class RemoveChunked(tester.TempestaTest): | ||
"""Remodve chunked encoding from http/1 responses and correctly frame them |
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.
"""Remodve chunked encoding from http/1 responses and correctly frame them | |
"""Remove chunked encoding from http/1 responses and correctly frame them |
Transform payload to chunked encoding. | ||
Transform HTTP/1 payload to chunked encoding. | ||
|
||
Tempesta always cuts chunked encoding and adds it back for chunked messages. |
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.
Probably this won't be true with tempesta-tech/tempesta#1418 . Please consider the way #1418 will be fixed and correct the comment.
""" | ||
Every response in chunked encoding losing chunked encoding during message | ||
parsing and then it's added only if client is talking http/1 protocol. | ||
Chunked body looks different in than case: only firs and last chunk |
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.
Chunked body looks different in than case: only firs and last chunk | |
Chunked body looks different in than case: only first and last chunk |
'Date: %s\r\n' | ||
'\r\n%s\r\n' | ||
% (date, chunked_body)) | ||
srv.set_response(resp) |
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.
It seems the trailer headers tests are implemented for HTTP/1 clients only, but #1410.2 mentions the problem about caching responses with trailer headers. Please implement trailer headers tests for h2 as well. At least need to test (1) responses with trailer headers directly proxied to an h2 client and (2) response with trailed header is firstly cached by h1 request and next returned to an h2 client.
To compliance PR 1418 need to change existing tests and develop additional that will verify following rules:
|
|
All tests mentioned in the comment above were implemented in #310, this one PR doesn't need to be merged. |
No description provided.