-
Notifications
You must be signed in to change notification settings - Fork 200
"Unexpected content-type" when uploading gzipped docs #1070
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
Comments
@dpwiz : Thanks for the bug report. Please provide full details that make the bug easily reproducible. (Think of a script that can be run to trigger the bug, without making permanent modifications to Hackage.) |
cabal haddock --haddock-for-hackage hello
HACKAGE_API_KEY=...............................
PACKAGE_VER=hello-0.1.0.0
curl \
--header "Authorization: X-ApiKey $HACKAGE_API_KEY" \
-F_method=PUT \
-F_transform=file2raw \
-F_file=@dist-newstyle/$PACKAGE_VER-docs.tar.gz \
https://hackage.haskell.org/package/$PACKAGE_VER/docs On a related note, I'd prefer having |
There is 'cabal upload -d' for that purpose. Does this work for you? |
Not quite....
|
This looks like a bug in cabal. If possible, can you please search for this or similar in the cabal issues? I had a problem with curl and cabal once. Might also be OS specific. |
Meanwhile, I'd be glad for Hackage to allow me upload gzipped tarballs from the browser (: |
On macOS, I am getting e.g.
Maybe from running a similar command (with verbosity option |
Looks like the browser uses content-type=gzip and enconding=whatever instead. |
Could you fix your problem, @dpwiz ? |
No. Using browser still gives "unexpected content-type". And |
Please give some basic context: Version of
What happens if you use |
|
Anyway, the details of my setup are irrelevant. The code states explicitly it will refuse compressed tarballs:
(Yes, I can see |
I can confirm (in one instance) that the web interface for documentation upload rejected a I have never used the web form before, I always use |
Nah, |
Well, a 401 is about missing authorization. Are your auth settings up-to-date in
|
There is a bug in its "curl" transport. |
@hasufell and me have been triggering this issue as well, and @hasufell opened haskell/cabal#10252. FWIW, this morning, the bug triggered quite consistently for me as I was trying to upload docs. After I set the It seems kind of intermittent for me. |
good point, closing. |
When running
cabal haddock --haddock-for-hackage
it results in a.tar.gz
file being created.But trying to upload it (chrome, firefox) I'm getting the error:
And have to undo the gzip wrapping the cabal did for me before uploading it again.
This is annoying and wasteful.
The text was updated successfully, but these errors were encountered: