lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: LYNX-DEV 2-8 preparations (was Java etc)


From: Ty Sarna
Subject: Re: LYNX-DEV 2-8 preparations (was Java etc)
Date: Mon, 12 Jan 1998 10:35:15 -0600 (CST)

In article <address@hidden> you write:
> > How about the LYNXCGI problem?
> sorry - I lose track of some things - is there a summary for this one? 
> (again - if it's a bug - we either fix it or document it, but new features
> can wait: I have my own list too)

I posted about this twice before.  Lynx fails to set CONTENT_TYPE in the
emvironment of cgi programs it runs.  The spec seems to require it at
least for POST and one other (I've forgotten now).  The patch below sets
it always (or to "" if there is no content type), which seems harmless
enough.

I'd say this falls into the bug category. Without it, the lynxcgi
feature can only be used safely for GETs.

--- LYCgi.c     Tue Nov  4 16:55:08 1997
+++ ../../lynx/src/LYCgi.c      Sun Dec 28 18:45:20 1997
@@ -300,6 +300,7 @@
        HTStream *target  = NULL;               /* Unconverted data */
        int fd1[2], fd2[2];
        char buf[1024];
+       char content_type[128];
        pid_t pid;
 #if HAVE_TYPE_UNIONWAIT
        union wait wstatus;
@@ -472,6 +473,13 @@
                    StrAllocCat(cp, pref_charset);
                    add_environment_value(cp);
                }
+
+               strcpy(content_type, "CONTENT_TYPE=");
+               if (anAnchor->post_content_type) {
+                   strncat(content_type, anAnchor->post_content_type,
+                       sizeof(content_type) - sizeof("CONTENT_TYPE="));
+               }
+               add_environment_value(content_type);
 
                if (anAnchor->post_data) { /* post script, read stdin */
                    close(fd1[1]);

reply via email to

[Prev in Thread] Current Thread [Next in Thread]