[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: -post_data

GVL@141.com (Gerald V. Livingston lI) writes:

> This isn't debian specific, but what the hey.
> How does one find out the format needed to use the -post_data switch 
> in LYNX to feed data to a remote CGI using a script?

The data format is exactly what's sent to the server, so any reference 
on http should tell you.  Briefly, it's the syntax used in URL's after 
the ? - that is, data consists of one or more key/value pairs
separated by ampersands (&).  The key and the value are separated by
an equals sign (=), and sometimes a pair may consist of only a key,
with no equals sign or value.

Within the key and value, characters other than [A-Za-z0-9] are
encoded (*) - spaces (character 32) are replaced by plus signs (+) and
other characters are replaced by %XX, where XX is the hexidecimal
character code (note that spaces then can also be written as "%20" -
in fact, any character _can_ be written as a %-sequence, but only
certain characters need to be written that way)

I'm certain that some perl modules in libwww-perl already handle this
format as well as getting info. from the server - you're probably much 
better off using them than trying to pass this to lynx, unless for
some reason you're avoiding perl.

* Actually, you're allowed to stick more than just the digits and the
numbers in without %-encoding them.  In theory, the only characters
that need to be encoded are Control characters, space, double quote
(") and any of the characters in: ";/?:@&=+#%<>", but many people
encode anything except the letters and digits

Unsubscribe?  mail -s unsubscribe debian-user-request@lists.debian.org < /dev/null

Reply to: