diff --git a/lweb.pbi b/lweb.pbi index 51fdeb0..1382ed3 100644 --- a/lweb.pbi +++ b/lweb.pbi @@ -14,15 +14,11 @@ Module lhs_web ;* WebServer Variabeln / Parameter ;* ;{ - ;* - ;* Grund Variabeln - ;* - Define temp_clientid, temp_receivelength - Define counter_test, counter_test_extra + ;* ;* Identifikation des Servers. ;* - #OLF = Chr(13)+Chr(10) + Global.s conf_version = "V0.9" Global.s conf_titel = "LiHaSo Webserver " + conf_version @@ -227,8 +223,6 @@ Module lhs_web ;* Protected.i network_event , client_id, thread_alive, file_cache_thread Protected.i count_client - Protected.i t_live , counter_test - Protected client, datathread, temp_receivelength, counter_mem_buffers If conf_cache_enable = 1 : file_cache_thread = CreateThread(@FileCache(), 1) : EndIf @@ -338,9 +332,9 @@ Module lhs_web Procedure client(network_client_id.i) Protected thread_cli_id = network_client_id - Protected cli_stop, MyThreadJSON, ToCall, ToCallType - Protected thread_temp_string.s, thread_temp_cache.s, thread_temp_cache_memory, temp_receivelength, thread_temp_decode_memory - Protected thread_command_length, thread_max_pos, thread_pos, thread_reasign + Protected MyThreadJSON, ToCall, ToCallType + Protected thread_temp_cache.s, thread_temp_cache_memory, temp_receivelength, thread_temp_decode_memory + Protected thread_reasign Protected thread_data_size, thread_file_handle Protected.s thread_requested, thread_type, thread_date, thread_header, thread_work, JSONStringToMap, Handler_Response, response_status, PostMapString Protected thread_buffer, thread_buffer_offset, thread_buffer_length, buffer_sent @@ -883,21 +877,21 @@ Module lhs_web If Not FindMapElement(Header(), #http_head_content_length) : Header(#http_head_content_length) = "0" : EndIf If Not FindMapElement(Header(), #http_head_content_type) : Header(#http_head_content_type) = "text/txt" : EndIf - v_http_header = "HTTP/1.1 " + Header(#http_head_status) + #OLF + - #http_head_date + " " + Header(#http_head_date) + #OLF + - #http_head_server + " " + Header(#http_head_server) + #OLF + - #http_head_content_length + " " + Header(#http_head_content_length) + #OLF + - #http_head_content_type + " " + Header(#http_head_content_type) + #OLF + v_http_header = "HTTP/1.1 " + Header(#http_head_status) + #CRLF$ + + #http_head_date + " " + Header(#http_head_date) + #CRLF$ + + #http_head_server + " " + Header(#http_head_server) + #CRLF$ + + #http_head_content_length + " " + Header(#http_head_content_length) + #CRLF$ + + #http_head_content_type + " " + Header(#http_head_content_type) + #CRLF$ If MapSize(Header()) > 5 ResetMap(Header()) While NextMapElement(Header()) v_current = MapKey(Header()) If Bool(v_current <> #http_head_status And v_current <> #http_head_date And v_current <> #http_head_server And v_current <> #http_head_content_length And v_current <> #http_head_content_type) - v_http_header + v_current + " " + Header(v_current) + #OLF + v_http_header + v_current + " " + Header(v_current) + #CRLF$ EndIf Wend EndIf - v_http_header + #OLF + v_http_header + #CRLF$ ProcedureReturn v_http_header EndProcedure @@ -906,8 +900,8 @@ Module lhs_web Protected NewMap Header.s() Define.s JSONString, Working, Working_Line Define CountLines, Lines, JSON - If CountString(String,#OLF+#OLF) - Working = StringField(String,1,#OLF+#OLF) + If CountString(String,#CRLF$+#CRLF$) + Working = StringField(String,1,#CRLF$+#CRLF$) Else ProcedureReturn #error_string EndIf