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

Could not create paste: HTTP response code said error #86

Open
Hritik14 opened this issue Nov 27, 2017 · 9 comments
Open

Could not create paste: HTTP response code said error #86

Hritik14 opened this issue Nov 27, 2017 · 9 comments
Labels

Comments

@Hritik14
Copy link

I'm getting
pbpst: Could not create paste: HTTP response code said error pbpst: Removed empty swap flie (contingency)
when trying to create any paste.

@HalosGhost
Copy link
Owner

Hi, what provider are you using? and can you give me some basic information about the file? What file type is it, what size is it, etc.?

@Hritik14
Copy link
Author

Every file. Tried stdin as well. Provider is the default one. pb. The curl command from pb works fine though.

@HalosGhost
Copy link
Owner

Could you post the full output using -VV?

@Hritik14
Copy link
Author

*   Trying 138.197.7.107...
* TCP_NODELAY set
*   Trying 2604:a880:800:a1::78b:2001...
* TCP_NODELAY set
* Connected to ptpb.pw (138.197.7.107) port 443 (#0)
* ALPN, offering http/1.1
* successfully set certificate verify locations:
*   CAfile: /etc/ssl/certs/ca-certificates.crt
  CApath: none
* SSL connection using TLSv1.2 / ECDHE-RSA-AES128-GCM-SHA256
* ALPN, server accepted to use http/1.1
* Server certificate:
*  subject: CN=ptpb.pw
*  start date: Nov 17 05:20:15 2017 GMT
*  expire date: Feb 15 05:20:15 2018 GMT
*  subjectAltName: host "ptpb.pw" matched cert's "ptpb.pw"
*  issuer: C=US; O=Let's Encrypt; CN=Let's Encrypt Authority X3
*  SSL certificate verify ok.
> POST / HTTP/1.1
Host: ptpb.pw
Transfer-Encoding: chunked
Accept: application/json
Content-Type: multipart/form-data; boundary=------------------------6a307031b6691b71
Expect: 100-continue

< HTTP/1.1 100 Continue
* The requested URL returned error: 400 BAD REQUEST
* stopped the pause stream!
* Closing connection 0
pbpst: Could not create paste: HTTP response code said error
pbpst: Removed empty swap flie (contingency)

@HalosGhost
Copy link
Owner

Well, that is quite odd. Can you show me ls -l thefile and show me the full command you used to try to paste it?

@Hritik14
Copy link
Author

It's getting weirder.

/tmp   
❯ pbpst -S -f file 
https://ptpb.pw/pYBC
                                                                                                                                                                                               
/tmp   
❯ cat file | pbpst -S
pbpst: Could not create paste: HTTP response code said error
pbpst: Removed empty swap flie (contingency)
                                                                                                                                                                                               
/tmp   
❯ ls -l file
-rw-r--r-- 1 hritik hritik 6 Nov 28 00:54 file
                                                 

@agatsoh
Copy link

agatsoh commented Oct 11, 2018

I am getting the same error. I am trying the command

journalctl -keb -1| pbpst -S
pbpst: Could not create paste: HTTP response code said error
pbpst: Removed empty swap file (contingency)

Any workarounds for this as of now ?

@ghost
Copy link

ghost commented Jan 12, 2019

Same error here, using the latest git commit.

@HalosGhost
Copy link
Owner

Indeed. The fix for this involves reading/buffering in all of stdin so that the length can be determined; and then the request can be handled roughly as normal (link with more detail can be found in #89). I'm afraid I haven't gotten around to fixing it yet (work has become a bit hectic lately). If anyone wants to take a stab at it, I'd happily accept PRs (including partial work if it brings us closer to a real fix).

I am starting to have a bit more free-time (though that may change here shortly), so hopefully I can finally come back and address this properly in not too long ):

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

No branches or pull requests

3 participants