diff --git a/lib/includes/nghttp2/nghttp2.h b/lib/includes/nghttp2/nghttp2.h index 8680860b..5d080b1d 100644 --- a/lib/includes/nghttp2/nghttp2.h +++ b/lib/includes/nghttp2/nghttp2.h @@ -45,6 +45,13 @@ struct nghttp2_session; */ typedef struct nghttp2_session nghttp2_session; +/** + * @macro + * default priority value + */ +#define NGHTTP2_PRI_DEFAULT (1 << 30) +#define NGHTTP2_PRI_LOWEST ((1U << 31) - 1) + /** * @enum * diff --git a/lib/nghttp2_frame.h b/lib/nghttp2_frame.h index d92a1c8f..a5c03dbc 100644 --- a/lib/nghttp2_frame.h +++ b/lib/nghttp2_frame.h @@ -33,13 +33,6 @@ #include "nghttp2_hd.h" #include "nghttp2_buffer.h" -/** - * @macro - * default priority value - */ -#define NGHTTP2_PRI_DEFAULT (1 << 30) -#define NGHTTP2_PRI_LOWEST ((1U << 31) - 1) - #define NGHTTP2_MAX_FRAME_SIZE ((1 << 16) - 1) #define NGHTTP2_STREAM_ID_MASK 0x7fffffff diff --git a/src/nghttp2_ssl.cc b/src/nghttp2_ssl.cc index 8d8f910d..9af339c0 100644 --- a/src/nghttp2_ssl.cc +++ b/src/nghttp2_ssl.cc @@ -142,7 +142,7 @@ int Spdylay::submit_request(const std::string& scheme, const std::string& hostport, const std::string& path, const std::map &headers, - uint8_t pri, + int32_t pri, const nghttp2_data_provider *data_prd, int64_t data_length, void *stream_user_data) diff --git a/src/nghttp2_ssl.h b/src/nghttp2_ssl.h index 611dc522..37467194 100644 --- a/src/nghttp2_ssl.h +++ b/src/nghttp2_ssl.h @@ -58,7 +58,7 @@ public: int submit_request(const std::string& scheme, const std::string& hostport, const std::string& path, const std::map& headers, - uint8_t pri, + int32_t pri, const nghttp2_data_provider *data_prd, int64_t data_length, void *stream_user_data); diff --git a/src/spdycat.cc b/src/spdycat.cc index 8962f89d..0a89c105 100644 --- a/src/spdycat.cc +++ b/src/spdycat.cc @@ -373,7 +373,8 @@ void submit_request(Spdylay& sc, const std::string& hostport, { std::string path = req->make_reqpath(); int r = sc.submit_request(get_uri_field(req->uri.c_str(), req->u, UF_SCHEMA), - hostport, path, headers, 3, req->data_prd, + hostport, path, headers, + NGHTTP2_PRI_DEFAULT, req->data_prd, req->data_length, req); assert(r == 0); }