[MINOR] code factoring : capture_headers() serves requests and responses

Both request and response captures will have to parse headers following
the same methods. It's better to factorize the code, hence the new
capture_headers() function.
1 file changed