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

[curl] Use the response header to determine if content is encoded #15643

Merged
merged 1 commit into from Mar 12, 2019

Conversation

Projects
None yet
2 participants
@candrews
Copy link
Contributor

commented Mar 2, 2019

Description

The response header should be used to determine if the response is encoded.
Using the request header could be incorrect; the request could have asked
for content encoding, but the server may not have done so.

Motivation and Context

I noticed this problem while looking into how curl's encoding was implemented.
The requested encoding is used to determine if the response is encoded - which is wrong. The response headers should be used to determine if the response is encoded.
I'm not aware of any issues currently caused by this incorrectness, but it is wrong, so I figured I should fix it.

How Has This Been Tested?

Compiled on Linux then used for an hour or so, mostly playing Youtube videos, looking at my security camera, and displaying some pictures from my web server for testing. I didn't notice any problems.

Screenshots (if appropriate):

n/a

Types of change

  • Bug fix (non-breaking change which fixes an issue)
  • Clean up (non-breaking change which removes non-working, unmaintained functionality)
  • Improvement (non-breaking change which improves existing functionality)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that will cause existing functionality to change)
  • Cosmetic change (non-breaking change that doesn't touch code)
  • None of the above (please explain below)

Checklist:

  • My code follows the Code Guidelines of this project
  • My change requires a change to the documentation, either Doxygen or wiki
  • I have updated the documentation accordingly
  • I have read the Contributing document
  • I have added tests to cover my change
  • All new and existing tests passed
Show resolved Hide resolved xbmc/filesystem/CurlFile.cpp Outdated
[curl] Use the response header to determine if content is encoded
The response header should be used to determine if the response is encoded.
Using the request header could be incorrect; the request could have asked
for content encoding, but the server may not have done so.

@candrews candrews force-pushed the candrews:request-for-content-encoding branch 2 times, most recently from 707d773 to 05fff94 Mar 2, 2019

@candrews candrews referenced this pull request Mar 12, 2019

Merged

[curl] Accept all supported content encodings by default #15644

3 of 13 tasks complete

@pkerling pkerling merged commit 34a7001 into xbmc:master Mar 12, 2019

1 check passed

default You're awesome. Have a cookie
Details
@pkerling

This comment has been minimized.

Copy link
Member

commented Mar 12, 2019

Sorry, kind of forgot to merge this

@pkerling pkerling added this to the Leia 18.2-rc1 milestone Mar 12, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.