Nmap Development mailing list archives

[NSE] Redirects for http.post()


From: nnposter <nnposter () users sourceforge net>
Date: Thu, 1 Sep 2016 19:02:34 -0600

I am looking for outlook on (lack of) redirect support in http.post().
Specifically, the function currently does not support redirects but
there seems no technical reason why it should not or could not.

As a result, NSE code that consumes http.post()...

(a) may rely on the absence of redirect support going forward or at
least rely on not redirecting by default (unlike http.get() or http.head())

or

(b) should be defensive and keep including redirect_ok=false in the
options table despite being an effective no-op at the moment.


Given the fact that POST redirection is very common in the real world,
it seems to me that (b) is generally the right choice but I am not too
fond of adding code clutter that just reaffirms default behavior that is
possibly well settled.


Cheers,
nnposter
_______________________________________________
Sent through the dev mailing list
https://nmap.org/mailman/listinfo/dev
Archived at http://seclists.org/nmap-dev/


Current thread: