[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: lynx-dev lynx2.8.5dev.14h.patch.gz
From: |
Thomas Dickey |
Subject: |
Re: lynx-dev lynx2.8.5dev.14h.patch.gz |
Date: |
Tue, 8 Apr 2003 10:26:27 -0400 |
User-agent: |
Mutt/1.2.5i |
On Tue, Apr 08, 2003 at 05:47:33PM +0400, Leonid Pauzner wrote:
> 8-Apr-2003 08:56 Thomas Dickey wrote:
> > On Tue, Apr 08, 2003 at 04:33:02PM +0400, Leonid Pauzner wrote:
> >> 8-Apr-2003 08:13 Thomas Dickey wrote:
> >>
> >> >> Reading your patch (especially in LYMainLoop.c area),
> >> >> I am courious about the possibility of
> >> >> (doc->post_data != NULL) *but* (isBEmpty(doc->post_data) == TRUE)
> >> >>
> >> >> currently in lynx.
> >> >> IMHO, the invariant "post_data is NULL, or not NULL with len >0"
> >> >> could easily be achieved somethere in HText_SibmitForm - the only place
> >> >> where post_data is really changed.
> >>
> >> > yes - that's a possible problem with the change
> >> > (a form that has no data to post).
> >>
> >> Is there a case? (empty post data really sent with POST method)???
>
> > I don't know (it doesn't seem reasonable - which is why I said "possible").
>
> And this is you, who rewrote SubmitForm recently;)
true - but I didn't redesign it (a difference). not all of the questionable
things that I see in a program are necessarily bugs (though it seems that
more are than I assume ;-)
Rereading dev.14's version of HTSubmitForm, it appears that a GET could
be constructed with an empty post_data string.
> >> > I guess we need a flag such as "have_post_data" to cover this situation.
> >>
> >> Better, use `post_data' as a pointer to some struct (more members).
>
> > it _is_ a pointer. The isBEmpty() macro is hiding that.
>
> I mean
> struct {
> bstring* data;
> char* post_content_type;
> ...
> }
> and macros: free, copy, compare
> (joke)
oh - but then that would change all of the references to post_data.
we're only checking if the value is non-empty in about 1/3 of those cases.
--
Thomas E. Dickey <address@hidden>
http://invisible-island.net
ftp://invisible-island.net
; To UNSUBSCRIBE: Send "unsubscribe lynx-dev" to address@hidden