mirror of
https://github.com/stefanocasazza/ULib.git
synced 2025-09-28 19:05:55 +08:00
some fix
This commit is contained in:
parent
89af64a8bd
commit
7886a7954e
|
@ -55,7 +55,7 @@ static void usp_end_db()
|
|||
#endif
|
||||
-->
|
||||
<!--#header
|
||||
Content-Type: application/json; charset=UTF-8
|
||||
Content-Type: application/json
|
||||
-->
|
||||
<!--#code
|
||||
pworld_db->id = u_get_num_random(10000);
|
||||
|
|
|
@ -36,7 +36,7 @@ static void usp_end_json()
|
|||
#endif
|
||||
-->
|
||||
<!--#header
|
||||
Content-Type: application/json; charset=UTF-8
|
||||
Content-Type: application/json
|
||||
-->
|
||||
<!--#code
|
||||
#ifndef AS_cpoll_cppsp_DO
|
||||
|
|
|
@ -64,7 +64,7 @@ static void usp_end_query()
|
|||
queries;
|
||||
-->
|
||||
<!--#header
|
||||
Content-Type: application/json; charset=UTF-8
|
||||
Content-Type: application/json
|
||||
-->
|
||||
<!--#code
|
||||
int i = 0, num_queries;
|
||||
|
|
|
@ -51,7 +51,7 @@ static void usp_end_rdb()
|
|||
#endif
|
||||
-->
|
||||
<!--#header
|
||||
Content-Type: application/json; charset=UTF-8
|
||||
Content-Type: application/json
|
||||
-->
|
||||
<!--#code
|
||||
UStringRep* rep;
|
||||
|
|
|
@ -54,7 +54,7 @@ static void usp_end_rquery()
|
|||
queries;
|
||||
-->
|
||||
<!--#header
|
||||
Content-Type: application/json; charset=UTF-8
|
||||
Content-Type: application/json
|
||||
-->
|
||||
<!--#code
|
||||
World* pworld;
|
||||
|
|
|
@ -54,7 +54,7 @@ static void usp_end_rupdate()
|
|||
queries;
|
||||
-->
|
||||
<!--#header
|
||||
Content-Type: application/json; charset=UTF-8
|
||||
Content-Type: application/json
|
||||
-->
|
||||
<!--#code
|
||||
World* pworld;
|
||||
|
|
|
@ -72,7 +72,7 @@ static void usp_end_update()
|
|||
queries;
|
||||
-->
|
||||
<!--#header
|
||||
Content-Type: application/json; charset=UTF-8
|
||||
Content-Type: application/json
|
||||
-->
|
||||
<!--#code
|
||||
int i = 0, num_queries;
|
||||
|
|
|
@ -1053,6 +1053,18 @@ loop:
|
|||
|
||||
if (sz == UClientImage_Base::rstart)
|
||||
{
|
||||
U_INTERNAL_DUMP("settings_ack = %b U_http2_settings_len = %b", settings_ack, U_http2_settings_len)
|
||||
|
||||
if (settings_ack &&
|
||||
U_http2_settings_len)
|
||||
{
|
||||
U_DEBUG("HTTP2 upgrade: User-Agent = %.*S", U_HTTP_USER_AGENT_TO_TRACE);
|
||||
|
||||
openStream();
|
||||
|
||||
goto end;
|
||||
}
|
||||
|
||||
UClientImage_Base::rstart = 0;
|
||||
|
||||
UClientImage_Base::rbuffer->setEmpty();
|
||||
|
@ -1169,19 +1181,6 @@ loop:
|
|||
{
|
||||
// TODO
|
||||
|
||||
U_INTERNAL_DUMP("settings_ack = %b UClientImage_Base::rbuffer->size() = %u UClientImage_Base::rstart = %u",
|
||||
settings_ack, UClientImage_Base::rbuffer->size(), UClientImage_Base::rstart)
|
||||
|
||||
if (settings_ack &&
|
||||
UClientImage_Base::rbuffer->size() == UClientImage_Base::rstart)
|
||||
{
|
||||
U_INTERNAL_DUMP("User-Agent: = %.*S", U_HTTP_USER_AGENT_TO_TRACE)
|
||||
|
||||
openStream();
|
||||
|
||||
goto end;
|
||||
}
|
||||
|
||||
goto loop;
|
||||
}
|
||||
|
||||
|
|
|
@ -6018,15 +6018,22 @@ end:
|
|||
|
||||
if (u_is_html(mime_index))
|
||||
{
|
||||
# if defined(U_LOG_ENABLE) && defined(USE_LIBZ)
|
||||
u_put_unalignedp64(ptr1, U_MULTICHAR_CONSTANT64('/','h','t','m','l',';',' ','c'));
|
||||
u_put_unalignedp64(ptr1+8, U_MULTICHAR_CONSTANT64('h','a','r','s','e','t','=','U'));
|
||||
u_put_unalignedp32(ptr1+16, U_MULTICHAR_CONSTANT32('T','F','-','8'));
|
||||
u_put_unalignedp16(ptr1+20, U_MULTICHAR_CONSTANT16('\r','\n'));
|
||||
|
||||
sz += U_CONSTANT_SIZE("Content-Type: " U_CTYPE_HTML "\r\n");
|
||||
# else
|
||||
u_put_unalignedp64(ptr1, U_MULTICHAR_CONSTANT64('/','h','t','m','l','\r','\n','\0'));
|
||||
|
||||
sz += U_CONSTANT_SIZE("Content-Type: text/html\r\n");
|
||||
# endif
|
||||
}
|
||||
else
|
||||
{
|
||||
# if defined(U_LOG_ENABLE) && defined(USE_LIBZ)
|
||||
u_put_unalignedp64(ptr1, U_MULTICHAR_CONSTANT64('/','p','l','a','i','n',';',' '));
|
||||
u_put_unalignedp64(ptr1+8, U_MULTICHAR_CONSTANT64('c','h','a','r','s','e','t','='));
|
||||
u_put_unalignedp32(ptr1+16, U_MULTICHAR_CONSTANT32('U','T','F','-'));
|
||||
|
@ -6034,6 +6041,11 @@ end:
|
|||
u_put_unalignedp16(ptr1+21, U_MULTICHAR_CONSTANT16('\r','\n'));
|
||||
|
||||
sz += U_CONSTANT_SIZE("Content-Type: " U_CTYPE_TEXT "\r\n");
|
||||
# else
|
||||
u_put_unalignedp64(ptr1, U_MULTICHAR_CONSTANT64('/','p','l','a','i','n','\r','\n'));
|
||||
|
||||
sz += U_CONSTANT_SIZE("Content-Type: text/plain\r\n");
|
||||
# endif
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -9575,7 +9587,7 @@ U_NO_EXPORT void UHTTP::processGetRequest()
|
|||
{
|
||||
expire = 0L;
|
||||
|
||||
ctype = (mime_index == U_unknow ? U_CTYPE_TEXT
|
||||
ctype = (mime_index == U_unknow ? "text/plain"
|
||||
: file->getMimeType());
|
||||
}
|
||||
|
||||
|
|
|
@ -313,6 +313,7 @@ check_for_netcat() {
|
|||
NC=nc
|
||||
fi
|
||||
if [ "$NC_TEST" = "Ncat 6.47 " ] || \
|
||||
[ "$NC_TEST" = "Ncat 7.00 " ] || \
|
||||
[ "$NC_TEST" = "usage: nc [-46DdhklnrStUuvzC] [-i interval] [-p source_port]" ] || \
|
||||
[ "$NC_TEST" = "This is nc from the netcat-openbsd package. An alternative nc is available in the netcat-traditional package." ]; then
|
||||
NC=nc
|
||||
|
|
|
@ -55,7 +55,7 @@ static void usp_end_db()
|
|||
#endif
|
||||
-->
|
||||
<!--#header
|
||||
Content-Type: application/json; charset=UTF-8
|
||||
Content-Type: application/json
|
||||
-->
|
||||
<!--#code
|
||||
pworld_db->id = u_get_num_random(10000);
|
||||
|
|
|
@ -36,7 +36,7 @@ static void usp_end_json()
|
|||
#endif
|
||||
-->
|
||||
<!--#header
|
||||
Content-Type: application/json; charset=UTF-8
|
||||
Content-Type: application/json
|
||||
-->
|
||||
<!--#code
|
||||
#ifndef AS_cpoll_cppsp_DO
|
||||
|
|
|
@ -64,7 +64,7 @@ static void usp_end_query()
|
|||
queries;
|
||||
-->
|
||||
<!--#header
|
||||
Content-Type: application/json; charset=UTF-8
|
||||
Content-Type: application/json
|
||||
-->
|
||||
<!--#code
|
||||
int i = 0, num_queries;
|
||||
|
|
|
@ -51,7 +51,7 @@ static void usp_end_rdb()
|
|||
#endif
|
||||
-->
|
||||
<!--#header
|
||||
Content-Type: application/json; charset=UTF-8
|
||||
Content-Type: application/json
|
||||
-->
|
||||
<!--#code
|
||||
UStringRep* rep;
|
||||
|
|
|
@ -54,7 +54,7 @@ static void usp_end_rquery()
|
|||
queries;
|
||||
-->
|
||||
<!--#header
|
||||
Content-Type: application/json; charset=UTF-8
|
||||
Content-Type: application/json
|
||||
-->
|
||||
<!--#code
|
||||
World* pworld;
|
||||
|
|
|
@ -54,7 +54,7 @@ static void usp_end_rupdate()
|
|||
queries;
|
||||
-->
|
||||
<!--#header
|
||||
Content-Type: application/json; charset=UTF-8
|
||||
Content-Type: application/json
|
||||
-->
|
||||
<!--#code
|
||||
World* pworld;
|
||||
|
|
|
@ -72,7 +72,7 @@ static void usp_end_update()
|
|||
queries;
|
||||
-->
|
||||
<!--#header
|
||||
Content-Type: application/json; charset=UTF-8
|
||||
Content-Type: application/json
|
||||
-->
|
||||
<!--#code
|
||||
int i = 0, num_queries;
|
||||
|
|
Loading…
Reference in New Issue
Block a user