spdycat: wrap line longer than 79 chars
This commit is contained in:
parent
ccf225641e
commit
cdded94305
|
@ -224,7 +224,9 @@ struct SpdySession {
|
||||||
Config config;
|
Config config;
|
||||||
extern bool ssl_debug;
|
extern bool ssl_debug;
|
||||||
|
|
||||||
void submit_request(Spdylay& sc, const std::string& hostport, const std::map<std::string,std::string> &headers, Request* req)
|
void submit_request(Spdylay& sc, const std::string& hostport,
|
||||||
|
const std::map<std::string,std::string> &headers,
|
||||||
|
Request* req)
|
||||||
{
|
{
|
||||||
uri::UriStruct& us = req->us;
|
uri::UriStruct& us = req->us;
|
||||||
std::string path = us.dir+us.file+us.query;
|
std::string path = us.dir+us.file+us.query;
|
||||||
|
@ -512,7 +514,8 @@ int communicate(const std::string& host, uint16_t port,
|
||||||
assert(rv == 0);
|
assert(rv == 0);
|
||||||
}
|
}
|
||||||
for(int i = 0, n = spdySession.reqvec.size(); i < n; ++i) {
|
for(int i = 0, n = spdySession.reqvec.size(); i < n; ++i) {
|
||||||
submit_request(sc, spdySession.hostport, config.headers, spdySession.reqvec[i]);
|
submit_request(sc, spdySession.hostport, config.headers,
|
||||||
|
spdySession.reqvec[i]);
|
||||||
}
|
}
|
||||||
pollfds[0].fd = fd;
|
pollfds[0].fd = fd;
|
||||||
ctl_poll(pollfds, &sc);
|
ctl_poll(pollfds, &sc);
|
||||||
|
@ -726,14 +729,15 @@ int main(int argc, char **argv)
|
||||||
value++;
|
value++;
|
||||||
while( isspace( *value ) ) { value++; }
|
while( isspace( *value ) ) { value++; }
|
||||||
if ( *value == 0 ) {
|
if ( *value == 0 ) {
|
||||||
// This could also be a valid case for suppressing a header similar to curl
|
// This could also be a valid case for suppressing a header
|
||||||
|
// similar to curl
|
||||||
std::cerr << "-H: invalid header - value missing: " << optarg
|
std::cerr << "-H: invalid header - value missing: " << optarg
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
// Note that there is no processing currently to handle multiple message-header
|
// Note that there is no processing currently to handle multiple
|
||||||
// fields with the same field name
|
// message-header fields with the same field name
|
||||||
config.headers.insert( std::pair<std::string,std::string>( header, value ) );
|
config.headers.insert(std::pair<std::string,std::string>(header, value));
|
||||||
}
|
}
|
||||||
case 'a':
|
case 'a':
|
||||||
#ifdef HAVE_LIBXML2
|
#ifdef HAVE_LIBXML2
|
||||||
|
|
|
@ -55,7 +55,8 @@ public:
|
||||||
bool want_write();
|
bool want_write();
|
||||||
bool finish();
|
bool finish();
|
||||||
int fd() const;
|
int fd() const;
|
||||||
int submit_request(const std::string& hostport, const std::string& path, const std::map<std::string,std::string>& headers,
|
int submit_request(const std::string& hostport, const std::string& path,
|
||||||
|
const std::map<std::string,std::string>& headers,
|
||||||
uint8_t pri, void *stream_user_data);
|
uint8_t pri, void *stream_user_data);
|
||||||
int submit_settings(int flags, spdylay_settings_entry *iv, size_t niv);
|
int submit_settings(int flags, spdylay_settings_entry *iv, size_t niv);
|
||||||
bool would_block(int r);
|
bool would_block(int r);
|
||||||
|
|
Loading…
Reference in New Issue