Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > HTTP POST with *

Reply
Thread Tools

HTTP POST with *

 
 
Ike
Guest
Posts: n/a
 
      09-21-2006
If I have a field which I am POSTing, and that field is, say, a mathematical
expression such as:

2*8

must I escap the * somehow? what if it is something like:

8 / 2

How can I escape these String values when I POST them, such that the
subsequent page can retrive the original expression? Thanks, Ike



 
Reply With Quote
 
 
 
 
Jukka K. Korpela
Guest
Posts: n/a
 
      09-21-2006
Ike wrote:

> If I have a field which I am POSTing, and that field is, say, a
> mathematical expression such as:
>
> 2*8
>
> must I escap the * somehow?


The browser will do the necessary escaping (and your form handler has to do
the unescaping, normally by calling a suitable library subroutine).

In practice, "*" won't be escaped; it's a "safe" character.

BTW, 2*8 is just _pseudo_mathematical. In mathematics, the multiplication
sign is either or a dot operator, for which we can use the middle dot as
a replacement. The notation 2*8 is just computerese from the ASCII era.

> what if it is something like:
>
> 8 / 2


Similar considerations apply. In practice, the browser will escape "/" as
"%2F", but you need not worry about this at all. You simply call some
unescape routine in your form handler.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Http post and http get n3d!m Python 2 02-06-2012 09:18 PM
HTTP SOAP/HTTP GET/HTTP POST milan_9211 Software 0 01-10-2011 02:10 PM
Why getInputStream in a http servlet request isn't getting the datasent by browser HTTP POST action? James Java 3 11-25-2005 11:17 PM
HTTP GET vs HTTP POST protocol serge calderara ASP .Net Web Services 1 11-04-2005 01:27 PM
How to enter to .aspx page by http connection using http POST request farazkazmi@gmail.com Java 6 08-29-2005 02:58 PM



Advertisments