Explorar o código

Windows Zeilenumbrüche aus antwort entfernt

Kolja Strohm %!s(int64=6) %!d(string=hai) anos
pai
achega
e1307bde2c
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      Network/HttpRequest.cpp

+ 4 - 0
Network/HttpRequest.cpp

@@ -65,6 +65,8 @@ Answer::Answer( const char *answer )
     TextReader reader( new Text( answer ) );
     // parse header
     Text *line = reader.leseZeile();
+    line->remove( "\r\n" );
+    line->remove( "\n" );
     header += *line;
     header += "\n";
     int trenn = line->positionVon( " " );
@@ -82,6 +84,8 @@ Answer::Answer( const char *answer )
     while( !reader.istEnde() )
     {
         Text *line = reader.leseZeile();
+        line->remove( "\r\n" );
+        line->remove( "\n" );
         if( line->getLength() > 0 )
         {
             header += *line;