Skip to content

Loading…

POST with file uploads is broken #11

Open
supernovus opened this Issue · 4 comments

2 participants

@supernovus
Owner

Not sure how long this has been broken, but yeah, if you try to use a multipart/form-data POST with a file attachment, stuff breaks, badly.

@sergot
Collaborator

Hey supernovus!

Actually masak and I figured out that POST requests doesn't work at all.

I guess it's because of .get which returns only the first line (here: https://github.com/supernovus/perl6-http-easy/blob/master/lib/HTTP/Easy.pm6#L57) and later we want to extract the header from what we've just .get - which is incorrect. Going further we can't read the content because we dont have the Content-Length field and so on... :)

supernovus++ # a lot of work done

@supernovus
Owner

I due seem to remember planning on a rewrite of a bunch of these libraries. I'm guessing this is one that is in need of some fairly substantial changes in order to work as expected.

@sergot
Collaborator

I will try to find some time to fix this. :)

.recv would help, then some refactoring and.. we'll see.

@sergot
Collaborator

Quick solution:
7a6b553
should be enough, take a look.

We should check this commit, it may contain some redundant code or something. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.