diff options
| author | yangwei <[email protected]> | 2023-04-13 11:03:40 +0800 |
|---|---|---|
| committer | yangwei <[email protected]> | 2023-04-13 11:03:40 +0800 |
| commit | 177fac792dace1bce90964d88509e81a34e6fc59 (patch) | |
| tree | 8de79d0aeba12d4c24de580f5389f26b455e7efe /src/HTTP_Message_Region.c | |
| parent | 54ead0c924658ff289d54eb57b8f943634e73dce (diff) | |
🦄 refactor(lint warning): 修复lint工具告警
Diffstat (limited to 'src/HTTP_Message_Region.c')
| -rw-r--r-- | src/HTTP_Message_Region.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/HTTP_Message_Region.c b/src/HTTP_Message_Region.c index b1f2022..dae33eb 100644 --- a/src/HTTP_Message_Region.c +++ b/src/HTTP_Message_Region.c @@ -114,14 +114,14 @@ uchar http_doWithHost(http_parser_t* a_http, http_stream *a_http_stream, char* v a_http->url_buf = (char*)dictator_malloc(thread_seq, a_http->url_buflen); memcpy(a_http->url_buf, value, valuelen); memcpy(a_http->url_buf+valuelen, uri, urilen); - if(uri!=NULL) + //if(uri!=NULL) { dictator_free(thread_seq, uri); uri = NULL; } } /*20190111 ����URI*/ - else if(a_http->url_buf!=NULL && a_http->url_buflen>=strlen("http://") && 0==strncasecmp(a_http->url_buf, "http://", strlen("http://"))) + else if(a_http->url_buflen>=strlen("http://") && 0==strncasecmp(a_http->url_buf, "http://", strlen("http://"))) { a_http->parser.is_ab_uri = 1; } @@ -138,7 +138,7 @@ uchar http_doWithHost(http_parser_t* a_http, http_stream *a_http_stream, char* v memcpy(a_http->url_buf, value, valuelen); memcpy(a_http->url_buf+valuelen, "/", strlen("/")); memcpy(a_http->url_buf+valuelen+strlen("/"), uri, urilen); - if(uri!=NULL) + //if(uri!=NULL) { dictator_free(thread_seq, uri); uri = NULL; @@ -394,7 +394,7 @@ uchar http_outPutUrl(http_parser_t *a_http, struct streaminfo *a_tcp, int thread a_http->url_buf = (char*)dictator_malloc(thread_seq, a_http->url_buflen); memcpy(a_http->url_buf, serverIP_str, strlen(serverIP_str)); memcpy(a_http->url_buf+strlen(serverIP_str), uri, urilen); - if(uri!=NULL) + //if(uri!=NULL) { dictator_free(thread_seq, uri); uri = NULL; @@ -629,8 +629,7 @@ uchar http_doWithACompleteRegion(http_parser_t *cur_http_node, http_stream *a_ht region_flag &= prot_flag ; /*region value process, url in proc function*/ - if(g_http_regions[region_id].handler!=NULL&& - (region_flag|| + if((region_flag|| cur_http_node->interested_reg_mask==HTTP_HOST_MASK|| cur_http_node->interested_reg_mask==HTTP_CHARSET_MASK|| cur_http_node->interested_reg_mask==HTTP_TRANSFER_ENCODING_MASK|| |
