Tell curl to use HTTP version 1.1

By default, was getting the following error:
curl: (92) HTTP/2 stream 0 was not closed cleanly: PROTOCOL_ERROR (err 1)
This commit is contained in:
Darko Poljak 2019-05-03 22:16:51 +02:00
parent 71945ef956
commit bd9884fac4
2 changed files with 4 additions and 0 deletions

View file

@ -214,6 +214,7 @@ eof
# upload archive # upload archive
response_archive=$(curl -f -X POST \ response_archive=$(curl -f -X POST \
--http1.1 \
-H "PRIVATE-TOKEN: ${token}" \ -H "PRIVATE-TOKEN: ${token}" \
-F "file=@${archivename}" \ -F "file=@${archivename}" \
"https://code.ungleich.ch/api/v4/projects/${project}/uploads" \ "https://code.ungleich.ch/api/v4/projects/${project}/uploads" \
@ -221,6 +222,7 @@ eof
# upload archive signature # upload archive signature
response_archive_sig=$(curl -f -X POST \ response_archive_sig=$(curl -f -X POST \
--http1.1 \
-H "PRIVATE-TOKEN: ${token}" \ -H "PRIVATE-TOKEN: ${token}" \
-F "file=@${archivename}.asc" \ -F "file=@${archivename}.asc" \
"https://code.ungleich.ch/api/v4/projects/${project}/uploads" \ "https://code.ungleich.ch/api/v4/projects/${project}/uploads" \

View file

@ -249,6 +249,7 @@ eof
# upload archive # upload archive
response_archive=$(curl -f -X POST \ response_archive=$(curl -f -X POST \
--http1.1 \
-H "PRIVATE-TOKEN: ${token}" \ -H "PRIVATE-TOKEN: ${token}" \
-F "file=@${archivename}" \ -F "file=@${archivename}" \
"https://code.ungleich.ch/api/v4/projects/${project}/uploads" \ "https://code.ungleich.ch/api/v4/projects/${project}/uploads" \
@ -256,6 +257,7 @@ eof
# upload archive signature # upload archive signature
response_archive_sig=$(curl -f -X POST \ response_archive_sig=$(curl -f -X POST \
--http1.1 \
-H "PRIVATE-TOKEN: ${token}" \ -H "PRIVATE-TOKEN: ${token}" \
-F "file=@${archivename}.asc" \ -F "file=@${archivename}.asc" \
"https://code.ungleich.ch/api/v4/projects/${project}/uploads" \ "https://code.ungleich.ch/api/v4/projects/${project}/uploads" \