Andres, 

> > My questions about your commit in ReqResViewer:
> >
> > +        # Parse the request text
> > +        head,postdata = self.request.getBothTexts()
> > +        request = httpRequestParser(head, postdata)
> >  - Why did you in this situation use method getBothTexts()
> > instead of getObject() which already returns request object?
> 
> The problem with getObject is that the object is not updated if the
> user changes the text in the text view!

It is very strange because internal object (self._obj) is updated on every 
change
in all input places: text area tab, headers tab, param tab and so on.

For example see this callback function:

    def _changed(self, widg, toenable):
        """Supervises if the widget has some text."""
        rawBuf = self._raw.get_buffer()
        rawText = rawBuf.get_text(rawBuf.get_start_iter(), 
rawBuf.get_end_iter())

        for widg in toenable:
            widg(bool(rawText))

        self._changeRawCB()
        self._synchronize(self.SOURCE_RAW)
....


    def _changeRawCB(self):
        (head, data) = self.getBothTexts()
        try:
            if not len(head):
                raise w3afException("Empty HTTP Request head")
    -->     self._obj = httpRequestParser(head, data)
            self._raw.reset_bg_color()
        except w3afException, ex:
            self._raw.set_bg_color(gtk.gdk.color_parse("#FFCACA"))
....

-- 
Taras
----
"Software is like sex: it's better when it's free." - Linus Torvalds

Attachment: pgpCI2JXO0Z0g.pgp
Description: PGP signature

------------------------------------------------------------------------------
_______________________________________________
W3af-develop mailing list
W3af-develop@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/w3af-develop

Reply via email to