/usr/sbin/httpd and chunked transfer encoding

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

/usr/sbin/httpd and chunked transfer encoding

johnw-3
Hi, After installed owncloud/nextcloud on my openbsd,

I noticed android client do not support "chunked transfer encoding"

(https://github.com/owncloud/android/issues/1128"

Is it possible to disable this feature with "/usr/sbin/httpd"?

Any idea how to solve it?

Thanks.



signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: /usr/sbin/httpd and chunked transfer encoding

Reyk Floeter-2
Hi,

you cannot disable it and this Android client is broken.

"A recipient MUST be able to parse and decode the chunked transfer coding."

https://tools.ietf.org/html/rfc7230#section-4.1

Reyk

> Am 08.05.2017 um 03:06 schrieb johnw <[hidden email]>:
>
> Hi, After installed owncloud/nextcloud on my openbsd,
>
> I noticed android client do not support "chunked transfer encoding"
>
> (https://github.com/owncloud/android/issues/1128"
>
> Is it possible to disable this feature with "/usr/sbin/httpd"?
>
> Any idea how to solve it?
>
> Thanks.
>
>
Reply | Threaded
Open this post in threaded view
|

Re: /usr/sbin/httpd and chunked transfer encoding

johnw-3
On 05/08/2017 01:32 PM, Reyk Floeter wrote:

> Hi,
>
> you cannot disable it and this Android client is broken.
>
> "A recipient MUST be able to parse and decode the chunked
> transfer coding."
>
> https://tools.ietf.org/html/rfc7230#section-4.1
>
> Reyk
>
Agreed, this Android client is broken, but is it possible to make the
"chunked transfer coding" optional,
let people choice to compatible broken client like this one?


I tried to manully disable this feature by edit (I'm NOT really know
coding, just try) the code like below,

Index: server_fcgi.c
===================================================================
RCS file: /cvs/src/usr.sbin/httpd/server_fcgi.c,v
retrieving revision 1.74
diff -u -p -u -r1.74 server_fcgi.c
--- server_fcgi.c    21 Jan 2017 11:32:04 -0000    1.74
+++ server_fcgi.c    8 May 2017 05:50:05 -0000
@@ -385,7 +385,8 @@ server_fcgi(struct httpd *env, struct cl
         fcgi_add_stdin(clt, NULL);
     }
 
-    if (strcmp(desc->http_version, "HTTP/1.1") == 0) {
+    if (strcmp(desc->http_version, "HTTP/1.1") == 0 && \
+        strcmp("my-cloud.domain.com", srv_conf->name) != 0) {
         clt->clt_fcgi.chunked = 1;
     } else {
         /* HTTP/1.0 does not support chunked encoding */

And then this broken Android client work normally.

Please help, thanks.

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: /usr/sbin/httpd and chunked transfer encoding

Francois Stephany
Hi,

I don't know the politics behind ownCloud/nextcloud but it seems that there
are two apps:

- https://github.com/owncloud/android
- https://github.com/nextcloud/android

Maybe the nextcloud one fixed the bug?


On Mon, May 8, 2017 at 8:10 AM, johnw <[hidden email]> wrote:

> On 05/08/2017 01:32 PM, Reyk Floeter wrote:
> > Hi,
> >
> > you cannot disable it and this Android client is broken.
> >
> > "A recipient MUST be able to parse and decode the chunked
> > transfer coding."
> >
> > https://tools.ietf.org/html/rfc7230#section-4.1
> >
> > Reyk
> >
> Agreed, this Android client is broken, but is it possible to make the
> "chunked transfer coding" optional,
> let people choice to compatible broken client like this one?
>
>
> I tried to manully disable this feature by edit (I'm NOT really know
> coding, just try) the code like below,
>
> Index: server_fcgi.c
> ===================================================================
> RCS file: /cvs/src/usr.sbin/httpd/server_fcgi.c,v
> retrieving revision 1.74
> diff -u -p -u -r1.74 server_fcgi.c
> --- server_fcgi.c    21 Jan 2017 11:32:04 -0000    1.74
> +++ server_fcgi.c    8 May 2017 05:50:05 -0000
> @@ -385,7 +385,8 @@ server_fcgi(struct httpd *env, struct cl
>          fcgi_add_stdin(clt, NULL);
>      }
>
> -    if (strcmp(desc->http_version, "HTTP/1.1") == 0) {
> +    if (strcmp(desc->http_version, "HTTP/1.1") == 0 && \
> +        strcmp("my-cloud.domain.com", srv_conf->name) != 0) {
>          clt->clt_fcgi.chunked = 1;
>      } else {
>          /* HTTP/1.0 does not support chunked encoding */
>
> And then this broken Android client work normally.
>
> Please help, thanks.
>
Reply | Threaded
Open this post in threaded view
|

Re: /usr/sbin/httpd and chunked transfer encoding

johnw-3
Both tried and not work.

On 2017年5月8日 GMT+08:00下午4時57分56秒, Francois Stephany <[hidden email]> wrote:

>Hi,
>
>I don't know the politics behind ownCloud/nextcloud but it seems that
>there
>are two apps:
>
>- https://github.com/owncloud/android
>- https://github.com/nextcloud/android
>
>Maybe the nextcloud one fixed the bug?
>
>
>On Mon, May 8, 2017 at 8:10 AM, johnw <[hidden email]> wrote:
>
>> On 05/08/2017 01:32 PM, Reyk Floeter wrote:
>> > Hi,
>> >
>> > you cannot disable it and this Android client is broken.
>> >
>> > "A recipient MUST be able to parse and decode the chunked
>> > transfer coding."
>> >
>> > https://tools.ietf.org/html/rfc7230#section-4.1
>> >
>> > Reyk
>> >
>> Agreed, this Android client is broken, but is it possible to make the
>> "chunked transfer coding" optional,
>> let people choice to compatible broken client like this one?
>>
>>
>> I tried to manully disable this feature by edit (I'm NOT really know
>> coding, just try) the code like below,
>>
>> Index: server_fcgi.c
>> ===================================================================
>> RCS file: /cvs/src/usr.sbin/httpd/server_fcgi.c,v
>> retrieving revision 1.74
>> diff -u -p -u -r1.74 server_fcgi.c
>> --- server_fcgi.c    21 Jan 2017 11:32:04 -0000    1.74
>> +++ server_fcgi.c    8 May 2017 05:50:05 -0000
>> @@ -385,7 +385,8 @@ server_fcgi(struct httpd *env, struct cl
>>          fcgi_add_stdin(clt, NULL);
>>      }
>>
>> -    if (strcmp(desc->http_version, "HTTP/1.1") == 0) {
>> +    if (strcmp(desc->http_version, "HTTP/1.1") == 0 && \
>> +        strcmp("my-cloud.domain.com", srv_conf->name) != 0) {
>>          clt->clt_fcgi.chunked = 1;
>>      } else {
>>          /* HTTP/1.0 does not support chunked encoding */
>>
>> And then this broken Android client work normally.
>>
>> Please help, thanks.
>>


Key fingerprint: CDB3 6C62 254B C088 1E5D DD32 182C 97DB CF2C 80AC
Reply | Threaded
Open this post in threaded view
|

Re: /usr/sbin/httpd and chunked transfer encoding

Rick Hanson
On Mon, 08 May 2017 18:45 +0800, johnw wrote:
> Both tried and not work.

Yeah, you might be waiting for a while.  According to the following,
both projects have this as an open issue but haven't been able to commit
resources to it.  In the former case, the issue has been deferred from
one release to another for over a year and a half.

https://github.com/owncloud/android/issues/1128
https://github.com/nextcloud/android/issues/113

Reply | Threaded
Open this post in threaded view
|

Re: /usr/sbin/httpd and chunked transfer encoding

trondd-2
On Mon, May 8, 2017 5:22 pm, [hidden email] wrote:

> On Mon, 08 May 2017 18:45 +0800, johnw wrote:
>> Both tried and not work.
>
> Yeah, you might be waiting for a while.  According to the following,
> both projects have this as an open issue but haven't been able to commit
> resources to it.  In the former case, the issue has been deferred from
> one release to another for over a year and a half.
>
> https://github.com/owncloud/android/issues/1128
> https://github.com/nextcloud/android/issues/113
>

For an alternative mobile client, I was using Folder Sync (Lite) with
httpd and OwnCloud.

https://play.google.com/store/apps/details?id=dk.tacit.android.foldersync.full&hl=en

https://play.google.com/store/apps/details?id=dk.tacit.android.foldersync.lite&hl=en