-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update http_response.go #4662
Update http_response.go #4662
Conversation
…-tags Update http_response.go
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a use case for not wanting these new tags? If so, maybe they can be added conditionally.
Also, don't forget to gofmt
your code.
As discussed in #4413, let's call the tag containing the hostname of the remote server |
Ok, changed the code to use source instead of domain, @danielnelson . I applied the gofmt and it seemed to change indentation, is it correct as it should be, @glinton ? |
It's still failing the tests, saying to run |
go version go1.11 linux/amd64 |
Looks like the code in the commit is space indented, go fmt should convert to use tabs instead. |
@dannybeeckman can you run |
@glinton I tried but I can't find what I did wrong. Maybe it is because I develop in my own repo instead of a branch? |
There are conflict markers in http_response.go, but once those are solved you will need to use gofmt with Go 1.10 for now, we will change this soon but right now the tests are looking for the 1.10 format. |
@dannybeeckman are you using go 1.10? Also you'll need to undo the last commit where you pasted the terminal output to the end of the file. |
Closing due to inactivity. Please feel free to re-open if you would like to continue this work. |
Because the URL is only available in the full url format in the database, I am not able to select (group/filter) a specific hostname in the http_response plugin.
AS IS:
http_response,result=success,server=https://www.google.com:443/search/,status_code=200 http_response_code=200i,response_time=0.00778448,result_code=0i,result_type="success" 1536565736000000000
TO BE:
http_response,host=www.google.com,method=GET,path=/search/,port=443,protocol=https,result=success,server=https://www.google.com:443/search/,status_code=200 http_response_code=200i,response_time=0.00778448,result_code=0i,result_type="success" 1536565736000000000
I wrote a simple improvement.