the code is duplicated in intercepted_request_data_impl.cc.
How about sharing the same one?