Return-Path: X-Original-To: apmail-httpd-dev-archive@www.apache.org Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9875610005 for ; Wed, 18 Sep 2013 11:50:38 +0000 (UTC) Received: (qmail 57006 invoked by uid 500); 18 Sep 2013 11:50:28 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 56995 invoked by uid 500); 18 Sep 2013 11:50:28 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 56978 invoked by uid 99); 18 Sep 2013 11:50:25 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Sep 2013 11:50:25 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,NORMAL_HTTP_TO_IP,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of ylavic.dev@gmail.com designates 209.85.223.173 as permitted sender) Received: from [209.85.223.173] (HELO mail-ie0-f173.google.com) (209.85.223.173) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Sep 2013 11:50:18 +0000 Received: by mail-ie0-f173.google.com with SMTP id ar20so12293275iec.4 for ; Wed, 18 Sep 2013 04:49:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=LpP3g48BUwDKuTIeJ0zKteaq+t/oWiVs5I0C4+QTEZo=; b=eQNUcN8iHEuGJ4dINMkpe8x4NAsJkKANxvQcCkaD1pEtCTZuhzUjcyt9gfe7BoTUe0 WR+Vg8s0u6JEMWVhm8gVmrZmrOERAzQ+YNa5QX5/fWUQkc86yaogdVz/XIp+mM2RfNkf AgS6IkpuuQWZSQCMzzWyIoSTdiLaS9iaB3R/+rRBG4zIN15bfsox9zF5dQWgogU/+a9B NNp1R7EQWg5RN0odbTyHM9E5O6JEbKRaD6FeKgQoxJCP0nPV6zv2VBR+jPG6MPvBkMuk vVnJ3t0Z/V8RVLsr1AN+oA53a1zhwb8x65O+5oAfgQ8Q0JzcPDaw7y4TgIxUwvRhNuTn nDgQ== MIME-Version: 1.0 X-Received: by 10.50.60.5 with SMTP id d5mr3109850igr.26.1379504997616; Wed, 18 Sep 2013 04:49:57 -0700 (PDT) Received: by 10.43.132.131 with HTTP; Wed, 18 Sep 2013 04:49:57 -0700 (PDT) In-Reply-To: <27A7DF70-298B-47A5-9162-7167639790E6@jaguNET.com> References: <20130917183718.C1D542388B42@eris.apache.org> <27F63D55-0BF7-40BE-9936-D3FC5C8DEBAB@gbiv.com> <27A7DF70-298B-47A5-9162-7167639790E6@jaguNET.com> Date: Wed, 18 Sep 2013 13:49:57 +0200 Message-ID: Subject: Re: svn commit: r1524161 - in /httpd/httpd/trunk: CHANGES docs/log-message-tags/next-number modules/http/http_filters.c server/protocol.c From: Yann Ylavic To: dev@httpd.apache.org Content-Type: multipart/mixed; boundary=047d7b10c77f5a6b0b04e6a70919 X-Virus-Checked: Checked by ClamAV on apache.org --047d7b10c77f5a6b0b04e6a70919 Content-Type: multipart/alternative; boundary=047d7b10c77f5a6b0504e6a70917 --047d7b10c77f5a6b0504e6a70917 Content-Type: text/plain; charset=ISO-8859-1 S ame patch plus a (missing) log when the request is blocked in ap_read_request and minus a spurious semicolon unintentionally added in ap_http_filter's log. On Wed, Sep 18, 2013 at 1:14 PM, Jim Jagielski wrote: > Roy? > > On Sep 17, 2013, at 7:07 PM, Yann Ylavic wrote: > > > The following patch seems to be "draft-ietf-httpbis-p1-messaging-23, > > section 3.3.3.3" compliant (unlike current code) : > > > > > > Index: server/protocol.c > > =================================================================== > > --- server/protocol.c (revision 1524231) > > +++ server/protocol.c (working copy) > > @@ -1091,6 +1091,8 @@ request_rec *ap_read_request(conn_rec *conn) > > } > > > > if (!r->assbackwards) { > > + const char *tenc; > > + > > ap_get_mime_headers_core(r, tmp_bb); > > if (r->status != HTTP_OK) { > > ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(00567) > > @@ -1102,14 +1104,30 @@ request_rec *ap_read_request(conn_rec *conn) > > goto traceout; > > } > > > > - if (apr_table_get(r->headers_in, "Transfer-Encoding") > > - && apr_table_get(r->headers_in, "Content-Length")) { > > - /* > > http://tools.ietf.org/html/draft-ietf-httpbis-p1-messaging-23#page-31 > > - * "If a message is received with both a Transfer-Encoding > and a > > - * Content-Length header field, the Transfer-Encoding > overrides the > > - * Content-Length. ... A sender MUST remove the received > Content- > > - * Length field" > > + tenc = apr_table_get(r->headers_in, "Transfer-Encoding"); > > + if (tenc) { > > + /* > http://tools.ietf.org/html/draft-ietf-httpbis-p1-messaging-23 > > + * Section 3.3.3.3: "If a Transfer-Encoding header field is > > + * present in a request and the chunked transfer coding is > not > > + * the final encoding ...; the server MUST respond with the > 400 > > + * (Bad Request) status code and then close the connection". > > */ > > + if (strcasecmp(tenc, "chunked") != 0 > > + && !ap_find_last_token(r->pool, tenc, "chunked")) { > > + r->status = HTTP_BAD_REQUEST; > > + ap_send_error_response(r, 0); > > + ap_update_child_status(conn->sbh, SERVER_BUSY_LOG, r); > > + ap_run_log_transaction(r); > > + apr_brigade_destroy(tmp_bb); > > + goto traceout; > > + } > > + > > + /* > http://tools.ietf.org/html/draft-ietf-httpbis-p1-messaging-23 > > + * Section 3.3.3.3: "If a message is received with both a > > + * Transfer-Encoding and a Content-Length header field, the > > + * Transfer-Encoding overrides the Content-Length. ... A > sender > > + * MUST remove the received Content-Length field". > > + */ > > apr_table_unset(r->headers_in, "Content-Length"); > > } > > } > > Index: modules/http/http_filters.c > > =================================================================== > > --- modules/http/http_filters.c (revision 1524231) > > +++ modules/http/http_filters.c (working copy) > > @@ -224,23 +224,30 @@ apr_status_t ap_http_filter(ap_filter_t *f, apr_bu > > lenp = apr_table_get(f->r->headers_in, "Content-Length"); > > > > if (tenc) { > > - if (!strcasecmp(tenc, "chunked")) { > > + if (strcasecmp(tenc, "chunked") == 0 > > + || ap_find_last_token(f->r->pool, tenc, "chunked")) > { > > ctx->state = BODY_CHUNK; > > } > > - /* test lenp, because it gives another case we can handle */ > > - else if (!lenp) { > > - /* Something that isn't in HTTP, unless some future > > + else if (f->r->proxyreq != PROXYREQ_RESPONSE) { > > + /* Something that isn't a HTTP request, unless some > future > > * edition defines new transfer encodings, is > unsupported. > > */ > > ap_log_rerror( > > - APLOG_MARK, APLOG_INFO, 0, f->r, > > APLOGNO(01585) "Unknown Transfer-Encoding: %s", tenc); > > + APLOG_MARK, APLOG_INFO, 0, f->r, > > APLOGNO(01585) "Unknown Transfer-Encoding: %s; ", tenc); > > return APR_ENOTIMPL; > > } > > else { > > + /* > > http://tools.ietf.org/html/draft-ietf-httpbis-p1-messaging-23 > > + * Section 3.3.3.3: "If a Transfer-Encoding header > field is > > + * present in a response and the chunked transfer > coding is not > > + * the final encoding, the message body length is > determined by > > + * reading the connection until it is closed by the > server." > > + */ > > ap_log_rerror( > > - APLOG_MARK, APLOG_WARNING, 0, f->r, > > APLOGNO(01586) "Unknown Transfer-Encoding: %s; using Content-Length", > > tenc); > > + APLOG_MARK, APLOG_WARNING, 0, f->r, > > APLOGNO(01586) "Unknown Transfer-Encoding: %s; using closed > > connection", tenc); > > tenc = NULL; > > } > > + lenp = NULL; > > } > > if (lenp && !tenc) { > > char *endstr; > > > > > > --047d7b10c77f5a6b0504e6a70917 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
S
ame patch plus a (missing) log when the= request is blocked in ap_read_request and minus a spurious semicolon unintentionally<= /span> added in ap_http_filter's log.


O= n Wed, Sep 18, 2013 at 1:14 PM, Jim Jagielski <jim@jagunet.com> wrote:
Roy?

On Sep 17, 2013, at 7:07 PM, Yann Ylavic <ylavic.dev@gmail.com> wrote:

> The following patch seems to be "draft-ietf-httpbis-p1-messaging-= 23,
> section 3.3.3.3" compliant (unlike current code) :
>
> </PATCH>
> Index: server/protocol.c
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> --- server/protocol.c =A0 =A0(revision 1524231)
> +++ server/protocol.c =A0 =A0(working copy)
> @@ -1091,6 +1091,8 @@ request_rec *ap_read_request(conn_rec *conn)
> =A0 =A0 }
>
> =A0 =A0 if (!r->assbackwards) {
> + =A0 =A0 =A0 =A0const char *tenc;
> +
> =A0 =A0 =A0 =A0 ap_get_mime_headers_core(r, tmp_bb);
> =A0 =A0 =A0 =A0 if (r->status !=3D HTTP_OK) {
> =A0 =A0 =A0 =A0 =A0 =A0 ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, AP= LOGNO(00567)
> @@ -1102,14 +1104,30 @@ request_rec *ap_read_request(conn_rec *conn) > =A0 =A0 =A0 =A0 =A0 =A0 goto traceout;
> =A0 =A0 =A0 =A0 }
>
> - =A0 =A0 =A0 =A0if (apr_table_get(r->headers_in, "Transfer-En= coding")
> - =A0 =A0 =A0 =A0 =A0 =A0&& apr_table_get(r->headers_in, &q= uot;Content-Length")) {
> - =A0 =A0 =A0 =A0 =A0 =A0/*
> http://tools.ietf.org/html/draft-ietf-httpbis= -p1-messaging-23#page-31
> - =A0 =A0 =A0 =A0 =A0 =A0 * "If a message is received with both a= Transfer-Encoding and a
> - =A0 =A0 =A0 =A0 =A0 =A0 * Content-Length header field, the Transfer-= Encoding overrides the
> - =A0 =A0 =A0 =A0 =A0 =A0 * Content-Length. ... A sender MUST remove t= he received Content-
> - =A0 =A0 =A0 =A0 =A0 =A0 * Length field"
> + =A0 =A0 =A0 =A0tenc =3D apr_table_get(r->headers_in, "Transf= er-Encoding");
> + =A0 =A0 =A0 =A0if (tenc) {
> + =A0 =A0 =A0 =A0 =A0 =A0/* http://tools.ietf.org/htm= l/draft-ietf-httpbis-p1-messaging-23
> + =A0 =A0 =A0 =A0 =A0 =A0 * Section 3.3.3.3: "If a Transfer-Encoding header field is
> + =A0 =A0 =A0 =A0 =A0 =A0 * present in a request and the chunked trans= fer coding is not
> + =A0 =A0 =A0 =A0 =A0 =A0 * the final encoding ...; the server MUST re= spond with the 400
> + =A0 =A0 =A0 =A0 =A0 =A0 * (Bad Request) status code and then close t= he connection".
> =A0 =A0 =A0 =A0 =A0 =A0 =A0*/
> + =A0 =A0 =A0 =A0 =A0 =A0if (strcasecmp(tenc, "chunked") != =3D 0
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0&& !ap_find_last_toke= n(r->pool, tenc, "chunked")) {
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0r->status =3D HTTP_BAD_REQUEST; > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0ap_send_error_response(r, 0);
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0ap_update_child_status(conn->sbh, = SERVER_BUSY_LOG, r);
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0ap_run_log_transaction(r);
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0apr_brigade_destroy(tmp_bb);
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0goto traceout;
> + =A0 =A0 =A0 =A0 =A0 =A0}
> +
> + =A0 =A0 =A0 =A0 =A0 =A0/* http://tools.ietf.org/htm= l/draft-ietf-httpbis-p1-messaging-23
> + =A0 =A0 =A0 =A0 =A0 =A0 * Section 3.3.3.3: "If a message is received with both a
> + =A0 =A0 =A0 =A0 =A0 =A0 * Transfer-Encoding and a Content-Length hea= der field, the
> + =A0 =A0 =A0 =A0 =A0 =A0 * Transfer-Encoding overrides the Content-Le= ngth. ... A sender
> + =A0 =A0 =A0 =A0 =A0 =A0 * MUST remove the received Content-Length fi= eld".
> + =A0 =A0 =A0 =A0 =A0 =A0 */
> =A0 =A0 =A0 =A0 =A0 =A0 apr_table_unset(r->headers_in, "Conten= t-Length");
> =A0 =A0 =A0 =A0 }
> =A0 =A0 }
> Index: modules/http/http_filters.c
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> --- modules/http/http_filters.c =A0 =A0(revision 1524231)
> +++ modules/http/http_filters.c =A0 =A0(working copy)
> @@ -224,23 +224,30 @@ apr_status_t ap_http_filter(ap_filter_t *f, apr_= bu
> =A0 =A0 =A0 =A0 lenp =3D apr_table_get(f->r->headers_in, "C= ontent-Length");
>
> =A0 =A0 =A0 =A0 if (tenc) {
> - =A0 =A0 =A0 =A0 =A0 =A0if (!strcasecmp(tenc, "chunked")) {=
> + =A0 =A0 =A0 =A0 =A0 =A0if (strcasecmp(tenc, "chunked") =3D= =3D 0
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0|| ap_find_last_token(f->r= ->pool, tenc, "chunked")) {
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 ctx->state =3D BODY_CHUNK;
> =A0 =A0 =A0 =A0 =A0 =A0 }
> - =A0 =A0 =A0 =A0 =A0 =A0/* test lenp, because it gives another case w= e can handle */
> - =A0 =A0 =A0 =A0 =A0 =A0else if (!lenp) {
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0/* Something that isn't in HTTP, = unless some future
> + =A0 =A0 =A0 =A0 =A0 =A0else if (f->r->proxyreq !=3D PROXYREQ_R= ESPONSE) {
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0/* Something that isn't a HTTP re= quest, unless some future
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0* edition defines new transfer enco= dings, is unsupported.
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0*/
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 ap_log_rerror(
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0APLOG_MARK, APLOG_INF= O, 0, f->r,
> APLOGNO(01585) "Unknown Transfer-Encoding: %s", tenc);
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0APLOG_MARK, APLOG_INF= O, 0, f->r,
> APLOGNO(01585) "Unknown Transfer-Encoding: %s; ", tenc);
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 return APR_ENOTIMPL;
> =A0 =A0 =A0 =A0 =A0 =A0 }
> =A0 =A0 =A0 =A0 =A0 =A0 else {
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0/*
> http://tools.ietf.org/html/draft-ietf-httpbis-p1-mess= aging-23
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 * Section 3.3.3.3: "If a Transfer-Encoding header field i= s
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 * present in a response and the chun= ked transfer coding is not
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 * the final encoding, the message bo= dy length is determined by
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 * reading the connection until it is= closed by the server."
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 */
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 ap_log_rerror(
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0APLOG_MARK, APLOG_WAR= NING, 0, f->r,
> APLOGNO(01586) "Unknown Transfer-Encoding: %s; using Content-Leng= th",
> tenc);
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0APLOG_MARK, APLOG_WAR= NING, 0, f->r,
> APLOGNO(01586) "Unknown Transfer-Encoding: %s; using closed
> connection", tenc);
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 tenc =3D NULL;
> =A0 =A0 =A0 =A0 =A0 =A0}
> + =A0 =A0 =A0 =A0 =A0 =A0lenp =3D NULL;
> =A0 =A0 =A0 =A0 }
> =A0 =A0 =A0 =A0 if (lenp && !tenc) {
> =A0 =A0 =A0 =A0 =A0 =A0 char *endstr;
> </PATCH>
> <draft-ietf-httpbis-p1-messaging-23-section-3.3.3.3.pat= ch>


--047d7b10c77f5a6b0504e6a70917-- --047d7b10c77f5a6b0b04e6a70919 Content-Type: application/octet-stream; name="trunk-draft_ietf_httpbis_p1_messaging_23_section_3.3.3.3.patch" Content-Disposition: attachment; filename="trunk-draft_ietf_httpbis_p1_messaging_23_section_3.3.3.3.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_hlqhla1q0 SW5kZXg6IHNlcnZlci9wcm90b2NvbC5jCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIHNlcnZlci9wcm90b2NvbC5j CShyZXZpc2lvbiAxNTI0MzIxKQorKysgc2VydmVyL3Byb3RvY29sLmMJKHdvcmtpbmcgY29weSkK QEAgLTEwOTEsNiArMTA5MSw4IEBAIHJlcXVlc3RfcmVjICphcF9yZWFkX3JlcXVlc3QoY29ubl9y ZWMgKmNvbm4pCiAgICAgfQogCiAgICAgaWYgKCFyLT5hc3NiYWNrd2FyZHMpIHsKKyAgICAgICAg Y29uc3QgY2hhciAqdGVuYzsKKwogICAgICAgICBhcF9nZXRfbWltZV9oZWFkZXJzX2NvcmUociwg dG1wX2JiKTsKICAgICAgICAgaWYgKHItPnN0YXR1cyAhP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EtbWVzc2FnaW5nLTIzCisgICAgICAgICAgICAgKiBTZWN0aW9uIDMuMy4zLjM6ICJJ ZiBhIFRyYW5zZmVyLUVuY29kaW5nIGhlYWRlciBmaWVsZCBpcworICAgICAgICAgICAgICogcHJl c2VudCBpbiBhIHJlcXVlc3QgYW5kIHRoZSBjaHVua2VkIHRyYW5zZmVyIGNvZGluZyBpcyBub3QK KyAgICAgICAgICAgICAqIHRoZSBmaW5hbCBlbmNvZGluZyAuLi47IHRoZSBzZXJ2ZXIgTVVTVCBy ZXNwb25kIHdpdGggdGhlIDQwMAorICAgICAgICAgICAgICogKEJhZCBSZXF1ZXN0KSBzdGF0dXMg Y29kZSBhbmQgdGhlbiBjbG9zZSB0aGUgY29ubmVjdGlvbiIuCiAgICAgICAgICAgICAgKi8KKyAg ICAgICAgICAgIGlmIChzdHJjYXNlY21wKHRlbmMsICJjaHVua2VkIikgIT0gMCAvLyBmYXN0IHBh dGgKKyAgICAgICAgICAgICAgICAgICAgJiYgIWFwX2ZpbmRfbGFzdF90b2tlbihyLT5wb29sLCB0 ZW5jLCAiY2h1bmtlZCIpKSB7CisgICAgICAgICAgICAgICAgYXBfbG9nX3JlcnJvcihBUExPR19N QVJLLCBBUExPR19JTkZPLCAwLCByLCBBUExPR05PKCkKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICJjbGllbnQgc2VudCB1bmtub3duIFRyYW5zZmVyLUVuY29kaW5nICIKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICIoJXMpOiAlcyIsIHRlbmMsIHItPnVyaSk7CisgICAgICAg ICAgICAgICAgci0+c3RhdHVzID0gSFRUUF9CQURfUkVRVUVTVDsKKyAgICAgICAgICAgICAgICBh cF9zZW5kX2Vycm9yX3Jlc3BvbnNlKHIsIDApOworICAgICAgICAgICAgICAgIGFwX3VwZGF0ZV9j aGlsZF9zdGF0dXMoY29ubi0+c2JoLCBTRVJWRVJfQlVTWV9MT0csIHIpOworICAgICAgICAgICAg ICAgIGFwX3J1bl9sb2dfdHJhbnNhY3Rpb24ocik7CisgICAgICAgICAgICAgICAgYXByX2JyaWdh ZGVfZGVzdHJveSh0bXBfYmIpOworICAgICAgICAgICAgICAgIGdvdG8gdHJhY2VvdXQ7CisgICAg ICAgICAgICB9CisKKyAgICAgICAgICAgIC8qIGh0dHA6Ly90b29scy5pZXRmLm9yZy9odG1sL2Ry YWZ0LWlldGYtaHR0cGJpcy1wMS1tZXNzYWdpbmctMjMKKyAgICAgICAgICAgICAqIFNlY3Rpb24g My4zLjMuMzogIklmIGEgbWVzc2FnZSBpcyByZWNlaXZlZCB3aXRoIGJvdGggYQorICAgICAgICAg ICAgICogVHJhbnNmZXItRW5jb2RpbmcgYW5kIGEgQ29udGVudC1MZW5ndGggaGVhZGVyIGZpZWxk LCB0aGUKKyAgICAgICAgICAgICAqIFRyYW5zZmVyLUVuY29kaW5nIG92ZXJyaWRlcyB0aGUgQ29u dGVudC1MZW5ndGguIC4uLiBBIHNlbmRlcgorICAgICAgICAgICAgICogTVVTVCByZW1vdmUgdGhl IHJlY2VpdmVkIENvbnRlbnQtTGVuZ3RoIGZpZWxkIi4KKyAgICAgICAgICAgICAqLwogICAgICAg ICAgICAgYXByX3RhYmxlX3Vuc2V0KHItPmhlYWRlcnNfaW4sICJDb250ZW50LUxlbmd0aCIpOwog ICAgICAgICB9CiAgICAgfQpJbmRleDogbW9kdWxlcy9odHRwL2h0dHBfZmlsdGVycy5jCj09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT0KLS0tIG1vZHVsZXMvaHR0cC9odHRwX2ZpbHRlcnMuYwkocmV2aXNpb24gMTUyNDMyMSkK KysrIG1vZHVsZXMvaHR0cC9odHRwX2ZpbHRlcnMuYwkod29ya2luZyBjb3B5KQpAQCAtMjI0LDEy ICsyMjQsMTIgQEAgYXByX3N0YXR1c190IGFwX2h0dHBfZmlsdGVyKGFwX2ZpbHRlcl90ICpmLC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ZpbHRlcihhcF9maWx0ZXJfdCAqZiwgYXByX2J1CiAg ICAgICAgICAgICAgICAgcmV0dXJuIEFQUl9FTk9USU1QTDsKICAgICAgICAgICAgIH0KICAgICAg ICAgICAgIGVsc2UgeworICAgICAgICAgICAgICAgIC8qIGh0dHA6Ly90b29scy5pZXRmLm9yZy9o dG1sL2RyYWZ0LWlldGYtaHR0cGJpcy1wMS1tZXNzYWdpbmctMjMKKyAgICAgICAgICAgICAgICAg KiBTZWN0aW9uIDMuMy4zLjM6ICJJZiBhIFRyYW5zZmVyLUVuY29kaW5nIGhlYWRlciBmaWVsZCBp cworICAgICAgICAgICAgICAgICAqIHByZXNlbnQgaW4gYSByZXNwb25zZSBhbmQgdGhlIGNodW5r ZWQgdHJhbnNmZXIgY29kaW5nIGlzIG5vdAorICAgICAgICAgICAgICAgICAqIHRoZSBmaW5hbCBl bmNvZGluZywgdGhlIG1lc3NhZ2UgYm9keSBsZW5ndGggaXMgZGV0ZXJtaW5lZCBieQorICAgICAg ICAgICAgICAgICAqIHJlYWRpbmcgdGhlIGNvbm5lY3Rpb24gdW50aWwgaXQgaXMgY2xvc2VkIGJ5 IHRoZSBzZXJ2ZXIuIgorICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgIGFwX2xv Z19yZXJyb3IoCi0gICAgICAgICAgICAgICAgICAgICAgICBBUExPR19NQVJLLCBBUExPR19XQVJO SU5HLCAwLCBmLT5yLCBBUExPR05PKDAxNTg2KSAiVW5rbm93biBUcmFuc2Zlci1FbmNvZGluZzog JXM7IHVzaW5nIENvbnRlbnQtTGVuZ3RoIiwgdGVuYyk7CisgICAgICAgICAgICAgICAgICAgICAg ICBBUExPR19NQVJLLCBBUExPR19XQVJOSU5HLCAwLCBmLT5yLCBBUExPR05PKDAxNTg2KSAiVW5r bm93biBUcmFuc2Zlci1FbmNvZGluZzogJXM7IHVzaW5nIGNsb3NlZCBjb25uZWN0aW9uIiwgdGVu Yyk7CiAgICAgICAgICAgICAgICAgdGVuYyA9IE5VTEw7CiAgICAgICAgICAgICB9CisgICAgICAg ICAgICBsZW5wID0gTlVMTDsKICAgICAgICAgfQogICAgICAgICBpZiAobGVucCAmJiAhdGVuYykg ewogICAgICAgICAgICAgY2hhciAqZW5kc3RyOwo= --047d7b10c77f5a6b0b04e6a70919--