https://bz.apache.org/bugzilla/show_bug.cgi?id=65013

eR@SeR <nale...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |NEW

--- Comment #15 from eR@SeR <nale...@gmail.com> ---
> However, some commonly used extensions like .bmp .pdf .doc .docx .xls .xlsx 
> .rar .zip etc. are still not recognized and generated MIME type is still 
> application/octet-stream. You can check "Common MIME types" list on 
> https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types
>  and add all mentioned MIME types.
I checked all extensions from the MIME types list and almost all were properly
detected. Some are not, some differ a little bit, but I guess that is fine.
Nice improvement though :)

> 1. If parameter starts with @ like "@somevalue", form-data parameter is put 
> inside Files upload tab instead to remain in Parameters tab.
> 2. If same header or parameter name with same or different value is added, 
> only last header or parameter is generated. All headers or parameters should 
> be added even if they are duplicated.
> 3. If URL, header or parameter value is blank, cURL is not imported.
Those three are fixed except if URL is blank. As you mentioned, that is already
reported in https://bz.apache.org/bugzilla/show_bug.cgi?id=64636

(In reply to Felix Schumacher from comment #13)
> Created attachment 37646 [details]
> Fixes for multi-header and -parameter and mime detection
> 
> Another iteration on the remaining problems.
> 
> curl can do a lot of stuff when specifying parameters, like
> 'file=@filename;type=text/html' (which has been partly supported already) or
> 'param="something with spaces";headers=\"X-something: one\"'
> 
> The latter example is not possible right now, but a small step has been
> taken in that direction. Missing is also support for
> 'file=@"some/file";type=text/xml' that is a filename which was quoted.
Probably, the following parameter and file parameter example that I've found
might be related, so please confirm (or fix if not):

curl --location --request POST 'http://example.com/api/somepath' \
--header 'Accept-Language: it-IT' \
--header 'HTTP_X_FORWARDED_FOR: 127.0.0.1' \
--form 'FrontsideImage=@"/C:/Users/someuser/Desktop/Desktop.jpg"' \
--form 'BacksideImage=@"/C:/Users/someuser/Desktop/Desktop.jpg"' \
--form 'ApplicationTypeId=""' \
--form 'Country="ITA"' \
--form 'DocumentType="ID_CARD"' \
--form 'parameterWithAllSymbols="testTEST
~`!@#$%^&*()_+1234567890[]{};'\''\\:\"|,./<>?"' \
--form 'fileNameWithAllAllowedSymbolsByWin=@"/C:/Users/someuser/Desktop/Desktop
0123456789 `~!@#$&()_+{}[];'\''..jpg"'

Actual chars typed in Postman:

parameterWithAllSymbols = testTEST ~`!@#$%^&*()_+1234567890[]{};'\:"|,./<>?
fileNameWithAllAllowedSymbolsByWin = Desktop 0123456789 `~!@#$&()_+{}[];'..jpg

It looks like that ' and ; are problematic ones. If they are removed, cURL is
properly imported.

Interesting part was if ; is put at the end of string, but without ' character
in parameterWithAllSymbols value, cURL is properly imported, but the same for '
is not working.

You said 'missing support'. Is there a workaround to make exceptions by
yourself? Maybe simple find and replace or regex can do the trick?

I noticed that ' is generated in Postman as '\''
Can find and replace fix it?

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to