Changeset 0b3bc05 in mod_gnutls


Ignore:
Timestamp:
Dec 2, 2004, 4:35:29 PM (15 years ago)
Author:
Paul Querna <chip@…>
Branches:
debian/master, debian/stretch-backports, jessie-backports, master, msva, upstream
Children:
0314deb
Parents:
ed47098
Message:

setting proper ignores.
adding an empty cache files
trying to fix >16kb writes.

Files:
2 added
1 edited

Legend:

Unmodified
Added
Removed
  • src/gnutls_io.c

    red47098 r0b3bc05  
    373373    return;
    374374#else
    375 ret = gnutls_handshake(ctxt->session);
     375        ret = gnutls_handshake(ctxt->session);
    376376        if (ret < 0) {
    377377            if (ret == GNUTLS_E_WARNING_ALERT_RECEIVED
     
    420420
    421421    if (ctxt->status < 0) {
    422 //        return ap_get_brigade(f->next, bb, mode, block, readbytes);
     422        return ap_get_brigade(f->next, bb, mode, block, readbytes);
    423423    }
    424424
     
    486486    while (!APR_BRIGADE_EMPTY(bb)) {
    487487        apr_bucket *bucket = APR_BRIGADE_FIRST(bb);
    488         if (APR_BUCKET_IS_EOS(bucket) || APR_BUCKET_IS_FLUSH(bucket)) {
    489             /** TODO: GnuTLS doesn't have a special flush method? **/
     488        if (APR_BUCKET_IS_EOS(bucket)) {
     489
     490            /* gnutls_bye(ctxt->session, GNUTLS_SHUT_RDWR); */
     491
    490492            if ((status = ap_pass_brigade(f->next, bb)) != APR_SUCCESS) {
    491493                return status;
    492494            }
    493495            break;
    494         }
    495         else if (AP_BUCKET_IS_EOC(bucket)) {
    496             gnutls_bye(ctxt->session, GNUTLS_SHUT_WR);
     496
     497        } else if (APR_BUCKET_IS_FLUSH(bucket)) {
    497498
    498499            if ((status = ap_pass_brigade(f->next, bb)) != APR_SUCCESS) {
     
    500501            }
    501502            break;
     503
     504        }
     505        else if (AP_BUCKET_IS_EOC(bucket)) {
     506
     507            gnutls_bye(ctxt->session, GNUTLS_SHUT_WR);
     508            gnutls_deinit(ctxt->session);
     509            if ((status = ap_pass_brigade(f->next, bb)) != APR_SUCCESS) {
     510                return status;
     511            }
     512            break;
     513
    502514        }
    503515        else {
     516
    504517            /* filter output */
    505518            const char *data;
     
    519532            }
    520533
    521             ret = gnutls_record_send(ctxt->session, data, len);
     534            do {
     535                ret = gnutls_record_send(ctxt->session, data, len);
     536            }
     537            while(ret == GNUTLS_E_INTERRUPTED || ret == GNUTLS_E_AGAIN);
    522538
    523539            if (ret < 0) {
     
    532548            }
    533549            else if ((apr_size_t) ret != len) {
     550                //apr_bucket_split(bucket, ret);
     551                //APR_BUCKET_REMOVE(bucket);
    534552                /* not all of the data was sent. */
    535553                /* mod_ssl basicly errors out here.. this doesn't seem right? */
     
    539557                             " of %" APR_SIZE_T_FMT " bytes.",
    540558                             len - (apr_size_t) ret, len);
     559                //continue;
    541560                if (ctxt->output_rc == APR_SUCCESS) {
    542561                    ctxt->output_rc = APR_EGENERAL;
Note: See TracChangeset for help on using the changeset viewer.