Encoding text to transfer with http
1 posts in topic
Flat View  Flat View

Posted By:   Aidan_Mulcahy
Posted On:   Wednesday, August 1, 2001 02:12 AM

How do I pass multiple lines of text to CGI? I have a JTextArea where I enter a series of commands with ';' at the end of each line and spaces between words.


run linker to out;
test result;

When this gets to my CGI script it's result is 'run linker to out'. I tried putting all the lines on one line but the result always stops at the first ';'. The spaces seem fine, but I tried the URLEncoder.encode anyway, but no good.

Any ideas?


Re: Encoding text to transfer with http

Posted By:   Tim_Rohaly  
Posted On:   Wednesday, August 1, 2001 10:12 AM

If you use HTTP GET, you are limited to one line
of characters that get appended to the URL and
therefore must be URL-encoded. The total
length of the request URL has to be <=255 characters.

If you use HTTP POST, the data you send
to the server appears in the body of the request,
does not have to be URL-encoded, and can contain
as many lines as you wish.
Search the FAQ for example code.

About | Sitemap | Contact