Andrew Sherman has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/15752 )

Change subject: IMPALA-9540 Test that Impala Shell no longer sends duplicate 
"Host" headers in http mode.
......................................................................


Patch Set 1:

(1 comment)

Let me know if you have more questions about this slightly tricky code.

http://gerrit.cloudera.org:8080/#/c/15752/1/tests/shell/test_shell_interactive.py
File tests/shell/test_shell_interactive.py:

http://gerrit.cloudera.org:8080/#/c/15752/1/tests/shell/test_shell_interactive.py@88
PS1, Line 88: self.headers.headers
> Sorry for this potentially obstuse question, but I have to confess, I'm a l
OK headers.headers does look weird.
Here self.headers is an attribute of the SimpleHTTPRequestHandler (actually the 
base class BaseHTTPServer.BaseHTTPRequestHandler). It's type is MeeasageClass 
which inherits from rfc822.Message. This type also has a headers attribute 
which is a simple list of strings.
The TestRequestHandler.headers is a class attribute which I am using as a rock 
to put the saved headers under. This is hacky and would not work in real code 
as that class attribute would be shared by all threads.
I am doing all this so I can save the headers that are received on the server 
side of the http call.



--
To view, visit http://gerrit.cloudera.org:8080/15752
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I82996015d0205923e854dac8bb88604778684c46
Gerrit-Change-Number: 15752
Gerrit-PatchSet: 1
Gerrit-Owner: Andrew Sherman <asher...@cloudera.com>
Gerrit-Reviewer: Andrew Sherman <asher...@cloudera.com>
Gerrit-Reviewer: David Knupp <dkn...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <impala-public-jenk...@cloudera.com>
Gerrit-Comment-Date: Wed, 22 Apr 2020 18:19:54 +0000
Gerrit-HasComments: Yes

Reply via email to