Unequal characters in HTTP POST request query data between web page and server

To my surprise, there is no difference between the real and untranslated ‘+’ character and the translated ‘+’ character of a space in the HTTP POST request.


The text ‘a + b = c’ in an input field of a web page returns the text ‘a++b=+c’ in the sys.stdin on a Python server.

How can I know if the character ‘+’ is the exact character of a web page, and not translated from a space?

The encoding of space as + is done for the URLs not the body of the POST.

Can you share the details of the HTTP that you are using?
Without the detail its hard to help.
Also what is the python code that you are process the form with?
Please provide a small example.

Once again, you are getting yourself into difficulties because you’re not using a proper web framework. I have NO IDEA what system you’ve set up and why it isn’t correctly parsing form-encoded content, but I do know that your issue simply wouldn’t exist if you use a well-known framework.

Please stop torturing yourself in this way, or at very least, stop torturing us with questions that have no useful answers beyond “start using Flask instead”.

Nothing here is untrue, but sometimes people are in constrained
environments. A couple of Pejamide’s posts have suggested this situation
to me - they’re working within some existing setup which may be hard to

Of course, that constraint should be made clear, because it is the exact
nature of the constrain which constrains what solutions might be

An an example, many years old, I once wrote a simple .ini parser for
someone which had to work in an extremely rigid Python environment
inside WebSphere. Possibly with an even-then obsolete Python (Jython of
some flavour IIRC).

So it’s possible that Pejamide has constraints on what they can use
and/or install.

Cameron Simpson cs@cskk.id.au

In a previous thread, a recommendation to look into a well-known framework was met with “will look into that when I get a chance”, so it’s sounding more like there are no actual constraints, just time. And these questions show that it’s taking more and more time to NOT look into a framework.