Taras, On Sun, Jul 26, 2009 at 6:18 PM, Taras<ta...@securityaudit.ru> wrote: > 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")) > ....
I might be in an error, you should test it for yourself. I remember that with getObject() for some reason it wasn't working. It's your branch, so if you say it's going to work I'll believe you more than myself ;) Test it and let me know =) Cheers, > -- > Taras > ---- > "Software is like sex: it's better when it's free." - Linus Torvalds > -- Andrés Riancho Founder, Bonsai - Information Security http://www.bonsai-sec.com/ http://w3af.sf.net/ ------------------------------------------------------------------------------ _______________________________________________ W3af-develop mailing list W3af-develop@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/w3af-develop