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

Fix HEAD Content-Length #17159

Merged
merged 1 commit into from Jan 9, 2020
Merged

Fix HEAD Content-Length #17159

merged 1 commit into from Jan 9, 2020

Conversation

Paxxi
Copy link
Member

@Paxxi Paxxi commented Jan 9, 2020

Description

Microhttpd added sanity checking for Content-Length in 0.9.68
see the cryptic release notes at
https://git.gnunet.org/libmicrohttpd.git/tree/ChangeLog mentioning
MHD_RF_INSANITY_HEADER_CONTENT_LENGTH

Motivation and Context

Test case started failing

How Has This Been Tested?

Test case passes, verified in debugger that Content-Length is sent and not 0

Screenshots (if appropriate):

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

Microhttpd added sanity checking for Content-Length in 0.9.68
see the cryptic release notes at
https://git.gnunet.org/libmicrohttpd.git/tree/ChangeLog mentioning
MHD_RF_INSANITY_HEADER_CONTENT_LENGTH
@thexai
Copy link
Member

thexai commented Jan 9, 2020

I had never seen all the balls in green :D

This has to be merged as soon as possible 👍

@Paxxi Paxxi merged commit 87b1f98 into xbmc:master Jan 9, 2020
@Paxxi Paxxi deleted the head_cont_length branch January 9, 2020 17:56
@@ -1303,5 +1303,11 @@ int CWebServer::AddHeader(struct MHD_Response *response, const std::string &name

CLog::Log(LOGDEBUG, LOGWEBSERVER, "CWebServer[%hu] [OUT] %s: %s", m_port, name.c_str(), value.c_str());

#if MHD_VERSION >= 0x00096800
if (name == "Content-Length")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should have used MHD_HTTP_HEADER_CONTENT_LENGTH.

Maven85 pushed a commit to Maven85/kodi that referenced this pull request Jan 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants