Diff

Differences From Artifact [107a3dbac4]:

To Artifact [c73ad10afc]:


   352    352   	/* Determine range */
   353    353   	if (range_end != 0) {
   354    354   		if (range_end <= range_start) {
   355    355   			return(NULL);
   356    356   		}
   357    357   
   358    358   		range_length = range_end - range_start;
          359  +
          360  +		filed_log_msg_debug("Computing length parameter: %llu = %llu - %llu",
          361  +			(unsigned long long) range_length,
          362  +			(unsigned long long) range_end,
          363  +			(unsigned long long) range_start
          364  +		);
   359    365   	}
   360    366   
   361    367   	/* Fill up structure to return */
   362    368   	buffer_st->path   = path;
   363    369   	buffer_st->headers.range.present = range_request;
   364    370   	buffer_st->headers.range.offset  = range_start;
   365    371   	buffer_st->headers.range.length  = range_length;
................................................................................
   430    436   		if (request->headers.range.offset != 0 || request->headers.range.length >= 0) {
   431    437   			if ((size_t) request->headers.range.offset >= fileinfo->len) {
   432    438   				filed_log_msg("PROCESS_REPLY_COMPLETE FD=... ERROR=416");
   433    439   
   434    440   				filed_error_page(fp, date_current, 416);
   435    441   			} else {
   436    442   				if (request->headers.range.length < 0) {
          443  +					filed_log_msg_debug("Computing length to fit in bounds: fileinfo->len = %llu, request->headers.range.offset = %llu",
          444  +						(unsigned long long) fileinfo->len,
          445  +						(unsigned long long) request->headers.range.offset
          446  +					);
          447  +
   437    448   					request->headers.range.length = fileinfo->len - request->headers.range.offset;
   438    449   				}
   439    450   
   440    451   				filed_log_msg_debug("Partial request, starting at: %llu and running for %llu bytes", (unsigned long long) request->headers.range.offset, (unsigned long long) request->headers.range.length);
   441    452   
   442    453   				http_code = 206;
   443    454   			}