mono / ngit

Automated jgit port to c#
261 stars 152 forks source link

[NGit] TransportHttp.IsSmartHttp bug when charset is specified in header #10

Closed fealebenpae closed 12 years ago

fealebenpae commented 13 years ago

The NGit.Transport.HttpTransport.IsSmartHttp method performs a direct equality comparison between an expected content-type header value and the actual one.

However, some HTTP servers append a charset value at the end of the content-type header, which confuses the equality check. For instance, "application/x-git-upload-pack-advertisement; charset=utf-8" is still valid Smart-HTTP, but because it does not equal "application/x-git-upload-pack-advertisement", IsSmartHttp returns false.

This is reproducible for the AppHarbor.com service and repositories hosted by Git Web (http://gitweb.codeplex.com).

slluis commented 13 years ago

This is a bug in JGit and should be reported to the JGit project (http://www.eclipse.org/jgit/support/).

alanmcgovern commented 12 years ago

Upstreamed the bug to: https://bugs.eclipse.org/bugs/show_bug.cgi?id=384289. We'll get the fix whenever they implement it. Closing this issue for now.