Re: Content-Type in form variables

Поиск
Список
Период
Сортировка
От Sam Mason
Тема Re: Content-Type in form variables
Дата
Msg-id 20090726012447.GQ5407@samason.me.uk
обсуждение исходный текст
Ответ на Content-Type in form variables  (Dennis Gearon <gearond@sbcglobal.net>)
Список pgsql-general
On Sat, Jul 25, 2009 at 11:12:15AM -0700, Dennis Gearon wrote:
> If I receive a form via POST or PUT with with mulitple variables,
> files, application/json, others, is there anywhere in the environment
> to test he mime type of each variable?

?? this doesn't seem particularly related to PG!  Anyway...

mime-types are conventionally associated with files, not variables.
if you want to do input validation maybe you could write (or find) a
parser? a set of regexs are normally easy and formal enough for simple
purposes.

Most languages contain code for parsing mime encoded documents; python
makes this sort of thing reasonably easy if you want to stay reasonably
low level or there are lots of frameworks around to simplify things.

--
  Sam  http://samason.me.uk/

В списке pgsql-general по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Using unnest
Следующее
От: Bill Moran
Дата:
Сообщение: Re: Disable databse listing for non-superuser (\l) ?