Commit a305e3b0 authored by Yann Garcia's avatar Yann Garcia
Browse files

Bug fixed in HTTP

parent 05da1c7e
Loading
Loading
Loading
Loading
+5 −3
Original line number Original line Diff line number Diff line
@@ -92,11 +92,13 @@ module LibItsHttp_Functions {
              p_headers[v_jdx].header_value := { p_headers_value[v_idx] }; // NOTE Codec won't encode it
              p_headers[v_jdx].header_value := { p_headers_value[v_idx] }; // NOTE Codec won't encode it
              break;
              break;
            }
            }
          } // End of 'for' statement 
          if (v_jdx == lengthof(p_headers)) {
          if (v_jdx == lengthof(p_headers)) {
              p_headers[v_jdx].header_value := { p_headers_value[v_jdx] };
            log("f_set_headers_list: Didn't get item: add it");
            p_headers[v_jdx].header_name := p_headers_to_set[v_idx];
            p_headers[v_jdx].header_value := { p_headers_value[v_idx] };
          }
          }
        } // End of 'for' statement
        } // End of 'for' statement
        } // End of 'for' statement
      } // End of function f_set_headers_list
      } // End of function f_set_headers_list
      
      
      function f_remove_headers_list(
      function f_remove_headers_list(
+24 −6
Original line number Original line Diff line number Diff line
@@ -196,13 +196,24 @@ module LibItsHttp_Templates {
          body          := p_body
          body          := p_body
      } // End of template mw_http_response_ok
      } // End of template mw_http_response_ok
      
      
      template (present) Response mw_http_response_ok_no_body(
                                                              template (present) Headers p_header := ?
      ) := {
          version_major := 1,
          version_minor := 1,
          statuscode    := 200,
          statustext    := ?,
          header        := p_header,
          body          := omit
      } // End of template mw_http_response_ok
      
      template (present) Response mw_http_response_201_created(
      template (present) Response mw_http_response_201_created(
                                                               template (present) HttpMessageBody p_body := ?,
                                                               template (present) HttpMessageBody p_body := ?,
                                                               template (present) Headers p_header := ?
                                                               template (present) Headers p_header := ?
      ) modifies mw_http_response_ok := {
      ) modifies mw_http_response_ok := {
          statuscode    := 201,
          statuscode    := 201,
          statustext    := "Created"
          statustext    := "Created"
      } // End of template mw_http_response_ok
      } // End of template mw_http_response_201_created
      
      
      template (present) Response mw_http_response_202_accepted(
      template (present) Response mw_http_response_202_accepted(
                                                                template (present) HttpMessageBody p_body := ?,
                                                                template (present) HttpMessageBody p_body := ?,
@@ -210,15 +221,14 @@ module LibItsHttp_Templates {
      ) modifies mw_http_response_ok := {
      ) modifies mw_http_response_ok := {
          statuscode    := 202,
          statuscode    := 202,
          statustext    := "Accepted"
          statustext    := "Accepted"
      } // End of template mw_http_response_ok
      } // End of template mw_http_response_202_accepted
      
      
      template (present) Response mw_http_response_204_no_content(
      template (present) Response mw_http_response_204_no_content(
                                                                   template (present) HttpMessageBody p_body := ?,
                                                                  template (present) Headers p_header := ?
                                                                  template (present) Headers p_header := ?
      ) modifies mw_http_response_ok := {
      ) modifies mw_http_response_ok_no_body := {
          statuscode    := 204,
          statuscode    := 204,
          statustext    := "No Content"
          statustext    := "No Content"
      } // End of template mw_http_response_ok
      } // End of template mw_http_response_204_no_content
      
      
      template (value) Response m_http_response_ko(
      template (value) Response m_http_response_ko(
                                                   in template (value) HttpMessageBody p_body,
                                                   in template (value) HttpMessageBody p_body,
@@ -299,6 +309,14 @@ module LibItsHttp_Templates {
          statustext    := "Precondition Failed"
          statustext    := "Precondition Failed"
      } // End of template mw_http_response_412_not_found
      } // End of template mw_http_response_412_not_found
      
      
      template Response mw_http_response_501_not_implemented(
                                                             template HttpMessageBody p_body  := *,
                                                             template (present) Headers p_header := ?
      ) modifies mw_http_response_ko := {
          statuscode    := 501,
          statustext    := "Not Implemented"
      } // End of template mw_http_response_501_not_implemented
      
    } // End of group http_responses
    } // End of group http_responses
    
    
    group http_xml_body {
    group http_xml_body {