-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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 Content-Length header to HEAD requests #14542
Merged
Merged
Commits on Feb 1, 2021
-
Add Content-Length header to HEAD requests
This change adds the header Content-Length to HEAD HTTP requests. The previous behaviour was blocking some Windows executables (i.e bitsadmin.exe) from downloading files hosted in Gitea. This along with PR go-gitea#14541, makes the web server compliant with HTTP RFC 2616 which states "The methods GET and HEAD MUST be supported by all general-purpose servers" and "The HEAD method is identical to GET except that the server MUST NOT return a message-body in the response." This should also respond to issues go-gitea#8030 and go-gitea#14532.
Configuration menu - View commit details
-
Copy full SHA for 46122fe - Browse repository at this point
Copy the full SHA 46122feView commit details -
This change adds the header Content-Length to HEAD HTTP requests
Pass the Size of the content as a parameter to ServeData() instead of calculating it using ioutil.ReadAll(reader) --> this call is dangerous and can result in a denial of service.
Configuration menu - View commit details
-
Copy full SHA for b2e00aa - Browse repository at this point
Copy the full SHA b2e00aaView commit details -
Add Content-Length header to HEAD requests
Quick fix for imported dependency not used.
Configuration menu - View commit details
-
Copy full SHA for d94cbd1 - Browse repository at this point
Copy the full SHA d94cbd1View commit details
Commits on Feb 2, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 3362cac - Browse repository at this point
Copy the full SHA 3362cacView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2e0f61f - Browse repository at this point
Copy the full SHA 2e0f61fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 95e7ccc - Browse repository at this point
Copy the full SHA 95e7cccView commit details
Commits on Feb 4, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 3805cde - Browse repository at this point
Copy the full SHA 3805cdeView commit details
Commits on Feb 5, 2021
-
Check if size is positiv int ...
Co-authored-by: zeripath <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for fbe554f - Browse repository at this point
Copy the full SHA fbe554fView commit details -
Configuration menu - View commit details
-
Copy full SHA for bb91f29 - Browse repository at this point
Copy the full SHA bb91f29View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.