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

HTTP Response Header with empty value causes error #1461

Open
Manwithpants812 opened this issue Sep 4, 2019 · 2 comments · May be fixed by #1712
Open

HTTP Response Header with empty value causes error #1461

Manwithpants812 opened this issue Sep 4, 2019 · 2 comments · May be fixed by #1712

Comments

@Manwithpants812
Copy link

Manwithpants812 commented Sep 4, 2019

Aria2 failed at downloading a file I was requesting with this error:

09/03 22:25:05 [ERROR] CUID#7 - Download aborted. URI=https://...
-> [HttpHeaderProcessor.cc:365] errorCode=1 Bad HTTP header: missing ':'

After narrowing down the problem by analyzing the traffic, I figured out why aria2 was refusing to download a file. Basically the HTTP Response Headers contain headers with empty values and this makes aria2 refuse to continue the download for whatever reason. Curl doesn't have this issue. I was only able to download the file with aria2 by intercepting the traffic with Charles and rewriting the HTTP Response Headers to remove these empty valued headers. Would very much appreciate some kind of fix for this behavior, or at least to ignore these empty HTTP Response Headers.

This is a partial screenshot of the empty HTTP Response Headers
https://i.ibb.co/yqMk7PR/Aria1.png

Can't really publicly provide a debug log unless I redact all links and sensitive info and access to the files are time dependent on a one time access token that expires within a day. If a dev is interested, I can privately provide log and the command I used but would have to be quick to access the files and test.

@Jimmy-Z
Copy link
Contributor

Jimmy-Z commented Oct 20, 2019

I think it should be easy to reproduce the test case through a simple cgi script, so don't worry about that, whether there would be anyone interested in fix this would be another story though.

@agowa
Copy link

agowa commented Nov 23, 2020

Just had the same issue with a pico http server from an android app.
The solution is very simple, just "break" instead of "throw" on that line and recompile aria2c...

agowa pushed a commit to agowa/aria2 that referenced this issue Nov 23, 2020
@agowa agowa linked a pull request Nov 23, 2020 that will close this issue
agowa pushed a commit to agowa/aria2 that referenced this issue Jan 8, 2023
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 a pull request may close this issue.

3 participants