Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


“Transfer-Encoding: Chunked” POST request problem

“Transfer-Encoding: Chunked” POST request problem

“Transfer-Encoding: Chunked” POST request problem

The HTTP 1.1 Compliance / “Transfer-Encoding: Chunked” POST request problem.
Please note: I’m developing across a number of platforms and Perl isn’t my strong point.

J2ME client (a) sends a simple HTTP POST request to a Perl server script (b).

The J2ME API (HTTP 1.1) forces “Transfer-Encoding: Chunked” and will automatically strip out any “Content length” headers when sending messages longer than the buffer on the handset.  The legacy (HTTP 1.0) Perl CGI modules will throw an error when a request comes without a “Content length” header or when “Transfer-Encoding” is set to “Chunked”.  Chunked data also contains a number of extra control characters that need to be filtered out.

This functionality works transparently for both images and text in PHP when sending “multipart/form-data” formatted data.

Required solution:
An example Perl script that can:
(1) Cope with no “Content length” header.
(2) Strip out the extra control characters.
(3) Run on an Apache test server and on an IIS deployment server.  Please include any server configuration details as I’m assuming that the implementation will require an additional Perl module that I am not currently aware of.

Any help appreciated as I can’t find any example scripts for other CGI modules on the web.


Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close