POST with file uploads is broken #11

Open
supernovus opened this Issue Mar 26, 2013 · 4 comments

Comments

Projects
None yet
2 participants
@supernovus
Owner

supernovus commented Mar 26, 2013

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

This comment has been minimized.

Show comment
Hide comment
@sergot

sergot Aug 5, 2014

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

Collaborator

sergot commented Aug 5, 2014

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

This comment has been minimized.

Show comment
Hide comment
@supernovus

supernovus Aug 6, 2014

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.

Owner

supernovus commented Aug 6, 2014

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

This comment has been minimized.

Show comment
Hide comment
@sergot

sergot Aug 6, 2014

Collaborator

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

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

Collaborator

sergot commented Aug 6, 2014

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

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

@sergot

This comment has been minimized.

Show comment
Hide comment
@sergot

sergot Aug 6, 2014

Collaborator

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

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

Collaborator

sergot commented Aug 6, 2014

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