newcomer questions

41 views
Skip to first unread message

desfrenes

unread,
May 15, 2011, 4:48:55 AM5/15/11
to AiP development
Hello,

Knowning I'm a PHP developer lurking at python's wsgi, you can tell I
find AiP very interesting. I have a few questions regarding the output
of __invoke: Can $body be an iterator, just like in wsgi ? If not, how
to handle large bodies such as the output of files ?

See you.

Alexey Zakhlestin

unread,
May 15, 2011, 7:35:53 AM5/15/11
to aip-p...@googlegroups.com

you can use php-streams instead of strings

I planned iterators, but didn't implement those yet.

--
Alexey Zakhlestin, http://twitter.com/jimi_dini
http://www.milkfarmsoft.com/

desfrenes

unread,
May 15, 2011, 9:12:20 AM5/15/11
to AiP development
Nice... I can see your example here:
https://github.com/indeyets/appserver-in-php/blob/master/AiP/App/FileServe.php#L60

About headers, I thought they would be expressed as key=>value pairs.
Instead they are expressed as a continuous list. why's that ?

On 15 mai, 13:35, Alexey Zakhlestin <indey...@gmail.com> wrote:

Alexey Zakhlestin

unread,
May 15, 2011, 9:19:05 AM5/15/11
to aip-p...@googlegroups.com
On Sun, May 15, 2011 at 5:12 PM, desfrenes <desf...@gmail.com> wrote:

> About headers, I thought they would be expressed as key=>value pairs.
> Instead they are expressed as a continuous list. why's that ?

To let you have several headers with the same name. HTTP allows that.
Ideal solution would be the list of pairs, but PHP doesn't have such
structures (in easy access, at least)

That's similar to what Python's WSGI has

Reply all
Reply to author
Forward
0 new messages