1
0
mirror of https://github.com/stefanocasazza/ULib.git synced 2025-10-26 19:57:22 +08:00
This commit is contained in:
stefanocasazza
2017-02-03 17:54:11 +01:00
parent dfbb91297c
commit 8ab852b339
31 changed files with 417 additions and 280 deletions

View File

@@ -104,6 +104,7 @@ public:
// streams
uint32_t max_processed_stream_id;
Stream streams[HTTP2_MAX_CONCURRENT_STREAMS];
bool bnghttp2;
#ifdef DEBUG
UHashMap<UString> dtable;
HpackDynamicTable ddyntbl;
@@ -244,7 +245,7 @@ protected:
static Connection* pConnection;
static const Settings settings;
static uint32_t wait_for_continuation;
static bool bcontinue100, bsetting_ack, bsetting_send, bnghttp2;
static bool bcontinue100, bsetting_ack, bsetting_send;
static uint8_t priority_weight; // 0 if not set
static bool priority_exclusive;
@@ -280,6 +281,7 @@ protected:
static void sendResetStream();
static void sendWindowUpdate();
static bool eraseHeaders(UStringRep* key, void* elem);
static void handlerDelete(UClientImage_Base* pclient);
static void updateSetting(unsigned char* ptr, uint32_t len);
static void writeData(struct iovec* iov, bool bdata, bool flag);

View File

@@ -269,6 +269,25 @@ public:
U_RETURN(true);
}
static void startRequest()
{
U_TRACE_NO_PARAM(0, "UHTTP::startRequest()")
# if (defined(U_SERVER_CHECK_TIME_BETWEEN_REQUEST) && defined(U_HTTP2_DISABLE)) || (defined(DEBUG) && !defined(U_LOG_DISABLE))
UClientImage_Base::startRequest();
# endif
// ------------------------------
// U_http_info.uri
// ....
// U_http_info.nResponseCode
// ....
// ------------------------------
U_HTTP_INFO_RESET(0);
u_clientimage_info.flag.u = 0;
}
// UPLOAD
static vPFi on_upload;
@@ -639,7 +658,7 @@ public:
#ifndef U_LOG_DISABLE
static char iov_buffer[20];
static struct iovec iov_vec[10];
# if !defined(U_CACHE_REQUEST_DISABLE) || defined(U_SERVER_CHECK_TIME_BETWEEN_REQUEST)
# if !defined(U_CACHE_REQUEST_DISABLE) || (defined(U_SERVER_CHECK_TIME_BETWEEN_REQUEST) && defined(U_HTTP2_DISABLE))
static uint32_t request_offset, referer_offset, agent_offset;
# endif