On Fri, Mar 12, 2010 at 1:23 PM, Alexey Savelyev
<address@hidden> wrote:
Hi Axel,
Yes.
HTML
<form action="" method="post">
<input value="" name="q" type="input">
<input type="submit">
</form>
HTTP packet dump is
POST /fastcgi?t=12345678901234567890123456789012 HTTP/1.1
Host: 172.16.206.130:999
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Connection: keep-alive
Referer: http://172.16.206.130:999/fix.php
Content-Type: application/x-www-form-urlencoded
Content-Length: 8
q=%D1%8F
FastCGI packet
SCRIPT_FILENAME/home/www/frontendx/fix.php..HTTP_X_TOKENtesttoken..SCRIPT_FILENAME/home/www/frontendx/fix."QUERY_STRINGt=12345678901234567890123456789012..REQUEST_METHODPOST.!CONTENT_TYPEapplication/x-www-form-urlencoded..CONTENT_LENGTH8..SCRIPT_NAME/fix..REQUEST_URI/search.php?t=12345678901234567890123456789012..DOCUMENT_URI/fix
.DOCUMENT_ROOT/home/www/frontendx..SERVER_PROTOCOLHTTP/1.1..GATEWAY_INTERFACECGI/1.1..SERVER_SOFTWAREnginx/0.7.65..REMOTE_ADDR172.16.206.1..REMOTE_PORT52781..SERVER_ADDR172.16.206.130..SERVER_PORT999..SERVER_NAMEaccounting.evoplus.com..REDIRECT_STATUS200..HTTP_HOST172.16.206.130:999.[HTTP_USER_AGENTMozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6.?HTTP_ACCEPTtext/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8..HTTP_ACCEPT_LANGUAGEen-us,en;q=0.5..HTTP_ACCEPT_ENCODINGgzip,deflate..HTTP_ACCEPT_CHARSETISO-8859-1,utf-8;q=0.7,*;q=0.7..HTTP_KEEP_ALIVE115.
HTTP_CONNECTIONkeep-alive.!HTTP_REFERERhttp://172.16.206.130:999/fix.php..!HTTP_CONTENT_TYPEapplication/x-www-form-urlencoded..HTTP_CONTENT_LENGTH8.................q=%D1%8F................
---
AlexeyHi Alexey,
In your first example, how are you submitting the data from the browser?
Eddie, I'll look at this over the next couple of days.
a.
On Fri, Mar 12, 2010 at 11:26 AM, Alexey Savelyev <address@hidden> wrote:
Hi all,
I’m evaluating fastcgi++ library for use in our next project. The library itself looks
solid but I’ve faced strange behavior/bug with UTF-8 characters.
environment.requestVarGet(KEY_KW,val_kw);
wstring val_kw;
wstring val_kw;
kw_encoded=Url::encode(val_kw);
out << "POST [" << val_kw << "]<br>";
out << "LEN [" << val_kw.length() << "]<br>";
out << "PENC [" << kw_encoded << "]<br>";
val_kw=L"я";
kw_encoded=Url::encode(val_kw);
out << "TEXT [" << val_kw << "]<br>";
out << "LEN [" << val_kw.length() << "]<br>";
out << "ENC [" << kw_encoded << "]<br>";
output:
POST [Ñ ]
LEN [2]
PENC [%c3%91%c2%8f]
TEXT [я]
LEN [1]
ENC [%d1%8f]
My concern is length of POST variable. I post single character and expect it to be a single w_char character.
And clues?
library version is fastcgi++-2.0beta-d0c390fa.
---
Alexey