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 Content-Range header #24

Closed
wants to merge 1 commit into from

Conversation

ahirata
Copy link

@ahirata ahirata commented Feb 5, 2017

According to the HTTP spec, a Content-Range header must start with "bytes " when using bytes as the range unit.

Some refs:

According to the spec, a Content-Range header must start with "bytes "
when using bytes as the range unit
@ahirata
Copy link
Author

ahirata commented Feb 7, 2017

Just to add some context, in my case, an error may occur when trying to pull a docker image from nexus:

Feb 01 21:27:53 user dockerd[4156]: time="2017-02-01T21:27:53.020840206Z" level=error msg="Download failed, retrying: could not parse Content-Range header: 1085508104-1143481246/1143481247"

@DarthHater
Copy link
Member

Hey @ahirata thanks for this. We are going to start taking a look at it internally soon.

Secondly, can you fill out a CLA, sign, scan all pages and send it to me: jhesse at sonatype dot com

http://www.sonatype.org/SonatypeCLA.pdf

Once we have that I'll try and get some more eyes on this and get it merged down.

@padresmurfa
Copy link

I've also just encountered a problem due to this. "https://github.com/eclipse/aether-core/blob/master/aether-transport-http/src/main/java/org/eclipse/aether/transport/http/HttpTransporter.java" fails to pull from nexus due to a malformed Content-Range response header from Nexus.

As far as I can tell, the HttpTransporter is implemented correctly according to RFC 2616, section 14.16 (Content-Range), while the PartialFetchHandler is not.

Btw. the link to the CLA is broken @DarthHater .

According to RFC 7233, there is actually also the possibility of non-byte based ranges, but I doubt that would come into play here.

@ahirata
Copy link
Author

ahirata commented Nov 2, 2018

I have completely forgotten about this PR. I'm sorry @DarthHater :(

@padresmurfa The issue this PR addresses is now fixed on master. I guess if you're still having problems using the most recent version you should open a new issue.

@ahirata ahirata closed this Nov 2, 2018
@ahirata ahirata deleted the fix-content-range branch November 2, 2018 17:33
@padresmurfa
Copy link

Thanks a lot, @ahirata, I can see that now. It looks like the fix was added about 4 months ago.

Odds are that I'm not using the most recent version, as this is an enterprise environment. I'll assume that I can get this fixed simply by getting the IT department to upgrade the server.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants