Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #3410 > unrolled thread
| Started by | Hans <hansyin@gmail.com> |
|---|---|
| First post | 2011-10-14 01:05 -0700 |
| Last post | 2011-10-16 03:55 +0000 |
| Articles | 7 — 4 participants |
Back to article view | Back to comp.lang.php
Can I stop sending content-length header? Hans <hansyin@gmail.com> - 2011-10-14 01:05 -0700
Re: Can I stop sending content-length header? Jerry Stuckle <jstucklex@attglobal.net> - 2011-10-14 05:56 -0400
Re: Can I stop sending content-length header? Hans <hansyin@gmail.com> - 2011-10-14 09:03 -0700
Re: Can I stop sending content-length header? Jerry Stuckle <jstucklex@attglobal.net> - 2011-10-14 12:37 -0400
Re: Can I stop sending content-length header? Hans <hansyin@gmail.com> - 2011-10-15 01:11 -0700
Re: Can I stop sending content-length header? Luuk <Luuk@invalid.lan> - 2011-10-15 10:58 +0200
Re: Can I stop sending content-length header? Eli the Bearded <*@eli.users.panix.com> - 2011-10-16 03:55 +0000
| From | Hans <hansyin@gmail.com> |
|---|---|
| Date | 2011-10-14 01:05 -0700 |
| Subject | Can I stop sending content-length header? |
| Message-ID | <5728ad0f-1fb7-4990-a0b7-21807736d99d@hv4g2000vbb.googlegroups.com> |
I'm using php with IIS. for some test,I hope php does not send back "content-length" header. I know using chunked transport-encoding can do it, but I don't want to use chunked coding either. In general, I know some http 1.0 server will not send "content-length" header and just closing the connection to indicate content finished. I want to simulate this behavior. Can I do it some way? Thanks a lot!
[toc] | [next] | [standalone]
| From | Jerry Stuckle <jstucklex@attglobal.net> |
|---|---|
| Date | 2011-10-14 05:56 -0400 |
| Message-ID | <j79109$5mk$2@dont-email.me> |
| In reply to | #3410 |
On 10/14/2011 4:05 AM, Hans wrote: > I'm using php with IIS. for some test,I hope php does not send back > "content-length" header. > I know using chunked transport-encoding can do it, but I don't want to > use chunked coding either. > > In general, I know some http 1.0 server will not send "content-length" > header and just closing the connection to indicate content finished. I > want to simulate this behavior. Can I do it some way? > > Thanks a lot! Not in PHP. If you don't send a content-length header, it will be sent for you. This is not http 1.0, and the rules are different. -- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstucklex@attglobal.net ==================
[toc] | [prev] | [next] | [standalone]
| From | Hans <hansyin@gmail.com> |
|---|---|
| Date | 2011-10-14 09:03 -0700 |
| Message-ID | <b91f8061-26ab-4c34-860b-9faa5be2290e@v28g2000vby.googlegroups.com> |
| In reply to | #3415 |
On Oct 14, 2:56 am, Jerry Stuckle <jstuck...@attglobal.net> wrote: > On 10/14/2011 4:05 AM, Hans wrote: > > > I'm using php with IIS. for some test,I hope php does not send back > > "content-length" header. > > I know using chunked transport-encoding can do it, but I don't want to > > use chunked coding either. > > > In general, I know some http 1.0 server will not send "content-length" > > header and just closing the connection to indicate content finished. I > > want to simulate this behavior. Can I do it some way? > > > Thanks a lot! > > Not in PHP. If you don't send a content-length header, it will be sent > for you. This is not http 1.0, and the rules are different. > > -- > ================== > Remove the "x" from my email address > Jerry Stuckle > JDS Computer Training Corp. > jstuck...@attglobal.net > ================== That's bad!, no way to hack it. Or I have to export my code from php to python? Thanks any way!
[toc] | [prev] | [next] | [standalone]
| From | Jerry Stuckle <jstucklex@attglobal.net> |
|---|---|
| Date | 2011-10-14 12:37 -0400 |
| Message-ID | <j79ogh$qii$2@dont-email.me> |
| In reply to | #3419 |
On 10/14/2011 12:03 PM, Hans wrote: > On Oct 14, 2:56 am, Jerry Stuckle<jstuck...@attglobal.net> wrote: >> On 10/14/2011 4:05 AM, Hans wrote: >> >>> I'm using php with IIS. for some test,I hope php does not send back >>> "content-length" header. >>> I know using chunked transport-encoding can do it, but I don't want to >>> use chunked coding either. >> >>> In general, I know some http 1.0 server will not send "content-length" >>> header and just closing the connection to indicate content finished. I >>> want to simulate this behavior. Can I do it some way? >> >>> Thanks a lot! >> >> Not in PHP. If you don't send a content-length header, it will be sent >> for you. This is not http 1.0, and the rules are different. >> > > That's bad!, no way to hack it. Or I have to export my code from php > to python? Thanks any way! I don't think you can stop python from doing it, either. -- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstucklex@attglobal.net ==================
[toc] | [prev] | [next] | [standalone]
| From | Hans <hansyin@gmail.com> |
|---|---|
| Date | 2011-10-15 01:11 -0700 |
| Message-ID | <3dc2b4f0-39ef-4dd5-a0b3-b00ff2f7a97b@13g2000prp.googlegroups.com> |
| In reply to | #3420 |
On Oct 14, 9:37 am, Jerry Stuckle <jstuck...@attglobal.net> wrote: > On 10/14/2011 12:03 PM, Hans wrote: > > > > > > > > > > > On Oct 14, 2:56 am, Jerry Stuckle<jstuck...@attglobal.net> wrote: > >> On 10/14/2011 4:05 AM, Hans wrote: > > >>> I'm using php with IIS. for some test,I hope php does not send back > >>> "content-length" header. > >>> I know using chunked transport-encoding can do it, but I don't want to > >>> use chunked coding either. > > >>> In general, I know some http 1.0 server will not send "content-length" > >>> header and just closing the connection to indicate content finished. I > >>> want to simulate this behavior. Can I do it some way? > > >>> Thanks a lot! > > >> Not in PHP. If you don't send a content-length header, it will be sent > >> for you. This is not http 1.0, and the rules are different. > > > That's bad!, no way to hack it. Or I have to export my code from php > > to python? Thanks any way! > > I don't think you can stop python from doing it, either. > > -- > ================== > Remove the "x" from my email address > Jerry Stuckle > JDS Computer Training Corp. > jstuck...@attglobal.net > ================== Using python seems can do everything. I already tried a simple python code(using python itself without any other web server support) to do it. but export all my php code to python will be a hard work.
[toc] | [prev] | [next] | [standalone]
| From | Luuk <Luuk@invalid.lan> |
|---|---|
| Date | 2011-10-15 10:58 +0200 |
| Message-ID | <4iunm8-o6k.ln1@luuk.invalid.lan> |
| In reply to | #3410 |
On 14-10-2011 10:05, Hans wrote: > I'm using php with IIS. for some test,I hope php does not send back > "content-length" header. > I know using chunked transport-encoding can do it, but I don't want to > use chunked coding either. > > In general, I know some http 1.0 server will not send "content-length" > header and just closing the connection to indicate content finished. I > want to simulate this behavior. Can I do it some way? > > Thanks a lot! Will this help: http://www.php.net/manual/en/function.header.php#96442 It still uses HTTP/1.1 but with a 204 response (as i try to understand what xxxbunker is doing there ;) -- Luuk
[toc] | [prev] | [next] | [standalone]
| From | Eli the Bearded <*@eli.users.panix.com> |
|---|---|
| Date | 2011-10-16 03:55 +0000 |
| Message-ID | <eli$1110152355@qz.little-neck.ny.us> |
| In reply to | #3410 |
In comp.lang.php, Hans <hansyin@gmail.com> wrote: > I'm using php with IIS. for some test,I hope php does not send back > "content-length" header. > I know using chunked transport-encoding can do it, but I don't want to > use chunked coding either. > > In general, I know some http 1.0 server will not send "content-length" > header and just closing the connection to indicate content finished. I > want to simulate this behavior. Can I do it some way? Have the client send a HTTP/1.0 request? Tell the server to server the script as HTTP/1.0? I know Apache has some controls for that (see "force-response-1.0"). Not sure you can do it in PHP though. Elijah ------ has never worked with IIS
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.php
csiph-web