Skip to content

mitmweb: handle {en,de}coding on server-side - #4811

Merged
mhils merged 2 commits into
mitmproxy:mainfrom
matthewhughes934:mitmweb-handle-encoding-on-server
Sep 23, 2021
Merged

mhils merged 2 commits into
mitmproxy:mainfrom
matthewhughes934:mitmweb-handle-encoding-on-server

Conversation

@matthewhughes934

Copy link
Copy Markdown
Contributor

Description

Handle this server-side rather than passing the message content encoding
details back when fetching flow content. If {en,de}coding fails, return
the raw request contents.

This addresses #4809

Checklist

  • I have updated tests where applicable.
  • I have added an entry to the CHANGELOG.

Handle this server-side rather than passing the message content encoding
details back when fetching flow content. If {en,de}coding fails, return
the raw request contents.

This addresses mitmproxy#4809
@mhils

mhils commented Sep 22, 2021

Copy link
Copy Markdown
Member

Excellent, thanks! 😃

@mhils
mhils enabled auto-merge (squash) September 22, 2021 12:10
auto-merge was automatically disabled September 22, 2021 20:48

Head branch was pushed to by a user without write access

@matthewhughes934
matthewhughes934 force-pushed the mitmweb-handle-encoding-on-server branch from d4ba33c to 4e29512 Compare September 22, 2021 20:48
@matthewhughes934

Copy link
Copy Markdown
Contributor Author

I force pushed the latest commit, unchanged, just to reboot the CI (one of the jobs got stuck waiting to start)

@mhils
mhils enabled auto-merge (squash) September 22, 2021 20:50
@matthewhughes934

Copy link
Copy Markdown
Contributor Author

Ah, it might be a good thing this got stuck. I'm seeing a crashing when playing around with the example in the ticket after editing a response:

ValueError: Received both a Transfer-Encoding and a Content-Length header, refusing as recommended in RFC 7230 Section 3.3.3. See #4799 for details.

I'll have a deeper look this evening

@mhils
mhils disabled auto-merge September 23, 2021 13:54
@mhils

mhils commented Sep 23, 2021

Copy link
Copy Markdown
Member

That should be unrelated to this PR here, so I'll pull the tigger. :) If you have examples with both transfer-encoding and content-length header I'm all ears though.

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

Successfully merging this pull request may close these issues.

2 participants