2 Copyright (C) 2000-2004 SKYRIX Software AG
4 This file is part of OpenGroupware.org.
6 OGo is free software; you can redistribute it and/or modify it under
7 the terms of the GNU Lesser General Public License as published by the
8 Free Software Foundation; either version 2, or (at your option) any
11 OGo is distributed in the hope that it will be useful, but WITHOUT ANY
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
14 License for more details.
16 You should have received a copy of the GNU Lesser General Public
17 License along with OGo; see the file COPYING. If not, write to the
18 Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
23 #ifndef __WOHttpAdaptor_WORequestParser_H__
24 #define __WOHttpAdaptor_WORequestParser_H__
26 #import <Foundation/NSObject.h>
29 WORequestParser (NOT FINISHED YET)
31 A specialized parser for WO HTTP requests. It has some advanced features
32 like streaming large request bodies to disk and mapping them into memory
33 instead of keeping the whole thing in memory all the time.
34 It also correctly works with HTTP methods that have no content-length
35 specified (the NGHttpParser tries to parse till EOF by default).
37 Note: since the parser keep transient state in the ivars, you need to have
38 at least one parser per thread when running in a multithreaded environment.
40 Note: if parsing fails you *need* to close the socket connection !
44 @class NGBufferedStream;
47 @interface WORequestParser : NSObject
50 NSException *lastException;
51 int (*readByte)(id,SEL);
54 unsigned char pushBack;
57 - (id)initWithBufferedStream:(NGBufferedStream *)_in;
61 - (WORequest *)parseNextRequest;
62 - (NSException *)lastException;
66 #endif /* __WOHttpAdaptor_WORequestParser_H__ */