• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 281
  • Last Modified:

How do I recv/trns Carriage Return in CGI script written in C?

Dear Sir/Ms.
     I just want to setup a CGI program(Written in C) which can change the password in the WWW interface.  And the CGI program accpept the Username, Old-Passwd and New-passwd, then it use fork() to generate a child process and create two pipe fdin/fdout to communicate the child process(the child process
is the telnet function on the destination host).  Then the child process use "passwd" command to change the passwd on the destination machine.  The program is working quite well under C shell.  But it really doesn't work under WWW interface, I think the reason is that httpd filters out all the Carriage Return so the command I issue from the parent can't reach the destination.

    Can you tell me how to receive and transmitt Carriage Return through httpd?
 What is  the Carriage Return turned into in the httpd?

     Thanks a lot.

    Please also send your reply to my E-mail box:

         mailto://hyjin@moon.bjnet.edu.cn

Yours,
Teddy
Mar 9, 1997
~
0
hyjin
Asked:
hyjin
1 Solution
 
chumpCommented:
Carriage and linefeed are transmitted as %0D and %0A.

0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now