You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I happily discovered that the multipart/form-data handling here is close to what you can do with LWP in Perl. However, while something like this will work fine:
Malformed UTF-8 at line 1 col 2
in block at /usr/local/Cellar/rakudo-star/2018.01/share/perl6/site/sources/C1F4E39233DAF4BE7A977583897637177143784D (HTTP::Request) line 220
in method form-data at /usr/local/Cellar/rakudo-star/2018.01/share/perl6/site/sources/C1F4E39233DAF4BE7A977583897637177143784D (HTTP::Request) line 199
in block at /usr/local/Cellar/rakudo-star/2018.01/share/perl6/site/sources/C1F4E39233DAF4BE7A977583897637177143784D (HTTP::Request) line 183
in method add-form-data at /usr/local/Cellar/rakudo-star/2018.01/share/perl6/site/sources/C1F4E39233DAF4BE7A977583897637177143784D (HTTP::Request) line 169
in sub POST at /usr/local/Cellar/rakudo-star/2018.01/share/perl6/site/sources/8C3E66EA3422F50B53B12301D43EDC5DCB9BE169 (HTTP::Request::Common) line 24
in sub POST at /usr/local/Cellar/rakudo-star/2018.01/share/perl6/site/sources/8C3E66EA3422F50B53B12301D43EDC5DCB9BE169 (HTTP::Request::Common) line 28
in block at /Users/sterling/test.p6 line 1
The problem is that the file is being slurped as text, when there's no way of knowing what the format of the original file is. The slurping ought to be done in bin mode, but that will lead to "Cannot use a Buf as a string, but you called the Stringy method on it" as soon as the binary content is added to the otherwise stringy content used to construct the headers and multipart boundaries.
The text was updated successfully, but these errors were encountered:
I happily discovered that the
multipart/form-data
handling here is close to what you can do with LWP in Perl. However, while something like this will work fine:This will not:
The exception is:
The problem is that the file is being slurped as text, when there's no way of knowing what the format of the original file is. The slurping ought to be done in bin mode, but that will lead to "Cannot use a Buf as a string, but you called the Stringy method on it" as soon as the binary content is added to the otherwise stringy content used to construct the headers and multipart boundaries.
The text was updated successfully, but these errors were encountered: