You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by svz <sv...@iprimus.com.au> on 2005/04/24 08:44:19 UTC

[users@httpd] HTTP_ACCEPT_CHARSET set when form is posted to cgi

Hi,

I have a webpage encoded as "utf-32BE"
in this page there is a form (method is set to post, accept-charset is 
set to "utf-32BE")

my .htaccess is setup so that apache knows that this page is utf-32be 
and accessing the page through apache is fine - the browser 
automatically uses the "utf-32be" encoding...

HOWEVER.....

when the aforementioned webpage posts the form to a cgi binary, in my 
cgi binary i check the environment variable "HTTP_ACCEPT_CHARSET" and it 
does NOT include "utf-32be"...

my QUESTION is:

should there be some configuration in apache to tell it to associate my 
cgi-binary with utf-32be acceptability (so that checking 
HTTP_ACCEPT_CHARSET environment variable will yield inclusion of 
"utf-32be" when posting form is done in "utf-32be") and if so - where 
would I be able to access such a configuration feature?

Kind regards,
Leon.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] HTTP_ACCEPT_CHARSET set when form is posted to cgi

Posted by svz <sv...@iprimus.com.au>.
Nick Kew wrote:

>Accept-Charset comes from the browser.  You don't set it, you respond
>to it in the server (including CGI scripts).  You can't just go
>making up charsets and assuming the browser will support them.
>
>  
>
sorry Nick - i should have been clearer (more detailed about the problem),

basically, i am trying to submit a form (from utf-32BE encoded web page) 
to a cgi binary (via apache of course).

the loading of page which contains the form by browser is absolutely 
fine (once again the browser gets the page via apache).

but whenever i submit the form - on cgi end, there are problems 
(content_length for example does not reflect any of the contents that i 
might type in form fields - i am not uploading any files at the moment - 
just having a textarea control...), reading from stdin also does not 
reflect the length of contents typed in (i.e. it ends too quickly)

form enctype is multipart/form-data and method is post...

i think you are right though - it may be the browser problem altogether...



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] HTTP_ACCEPT_CHARSET set when form is posted to cgi

Posted by Nick Kew <ni...@webthing.com>.
svz wrote:

> when the aforementioned webpage posts the form to a cgi binary, in my
> cgi binary i check the environment variable "HTTP_ACCEPT_CHARSET" and it
> does NOT include "utf-32be"...

Accept-Charset comes from the browser.  You don't set it, you respond
to it in the server (including CGI scripts).  You can't just go
making up charsets and assuming the browser will support them.

-- 
Nick Kew

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org