+#ifdef USE_ZLIB
+ /* merken, ob Stream bereits komprimiert wird */
+ old_z = My_Connections[Idx].options & CONN_ZIP;
+#endif
+
+ if( len > delta )
+ {
+ /* Es wurde ein Request gelesen */
+ My_Connections[Idx].msg_in++;
+ if( ! Parse_Request( Idx, My_Connections[Idx].rbuf )) return FALSE;
+ else action = TRUE;
+ }
+
+ /* Puffer anpassen */
+ My_Connections[Idx].rdatalen -= len;
+ memmove( My_Connections[Idx].rbuf, My_Connections[Idx].rbuf + len, My_Connections[Idx].rdatalen );
+
+#ifdef USE_ZLIB
+ if(( ! old_z ) && ( My_Connections[Idx].options & CONN_ZIP ) && ( My_Connections[Idx].rdatalen > 0 ))
+ {
+ /* Mit dem letzten Befehl wurde Socket-Kompression aktiviert.
+ * Evtl. schon vom Socket gelesene Daten in den Unzip-Puffer
+ * umkopieren, damit diese nun zunaechst entkomprimiert werden */
+ {
+ if( My_Connections[Idx].rdatalen > ZREADBUFFER_LEN )
+ {
+ /* Hupsa! Soviel Platz haben wir aber gar nicht! */
+ Log( LOG_ALERT, "Can't move read buffer: No space left in unzip buffer (need %d bytes)!", My_Connections[Idx].rdatalen );
+ return FALSE;
+ }
+ memcpy( My_Connections[Idx].zip.rbuf, My_Connections[Idx].rbuf, My_Connections[Idx].rdatalen );
+ My_Connections[Idx].zip.rdatalen = My_Connections[Idx].rdatalen;
+ My_Connections[Idx].rdatalen = 0;
+ Log( LOG_DEBUG, "Moved already received data (%d bytes) to uncompression buffer.", My_Connections[Idx].zip.rdatalen );
+ }
+ }
+#endif
+ }
+
+ if( action ) result = TRUE;
+ } while( action );
+
+ return result;