That's about the best you can do.

What I do is check for text/ and then I know it's converted. adding the
application/x-www-.... also is a good addition.

But most of my apps have dealt with JSON so I'm just being careful when
someone sends text/json (which is invalid but used anyhow) vs
application/json.

What I would ask is, why are you getting multipart/form-data. That's
normally used for file uploads. If you have the option to tell them
"that's an invalid content-type" maybe do that. :)

Brad

On Mon, Jan 16, 2017 at 3:29 PM, Justin Taylor <JUSTIN@xxxxxxxxxxxxx> wrote:

So I guess it's operating as designed. The content type coming in from
the real client is "multipart/form-data;" which is not converted. The test
form I created used "application/x-www-form-urlencoded" and is converted.


Bonus question:
Will I need to check the content type for "text/*" or
"application/x-www-form-urlencoded" to determine if it's already been
translated, or is there any easier way?
--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing
list
To post a message email: WEB400@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/web400.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2022 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.