@@ -8200,7 +8200,7 @@ HttpTransact::build_error_response(State *s, HTTPStatus status_code, const char
82008200
82018201 new_msg = body_factory->fabricate_with_old_api (error_body_type, s, 8192 , &len, body_language, sizeof (body_language), body_type,
82028202 sizeof (body_type), s->internal_msg_buffer_size ,
8203- s->internal_msg_buffer_size ? s->internal_msg_buffer : nullptr , nullptr );
8203+ s->internal_msg_buffer_size ? s->internal_msg_buffer : nullptr );
82048204
82058205 // After the body factory is called, a new "body" is allocated, and we must replace it. It is
82068206 // unfortunate that there's no way to avoid this fabrication even when there is no substitutions...
@@ -8254,7 +8254,6 @@ HttpTransact::build_redirect_response(State *s)
82548254 const char *new_url = nullptr ;
82558255 int new_url_len;
82568256 char *to_free = nullptr ;
8257- char body_language[256 ], body_type[256 ];
82588257
82598258 HTTPStatus status_code = HTTP_STATUS_MOVED_TEMPORARILY;
82608259 char *reason_phrase = (char *)(http_hdr_reason_lookup (status_code));
@@ -8292,10 +8291,9 @@ HttpTransact::build_redirect_response(State *s)
82928291 // ////////////////////////
82938292 s->free_internal_msg_buffer ();
82948293 s->internal_msg_buffer_fast_allocator_size = -1 ;
8295- s->internal_msg_buffer = body_factory->fabricate_with_old_api_build_va (
8296- " redirect#moved_temporarily" , s, 8192 , &s->internal_msg_buffer_size , body_language, sizeof (body_language), body_type,
8297- sizeof (body_type), " %s <a href=\" %s\" >%s</a>. %s." , " The document you requested is now" , new_url, new_url,
8298- " Please update your documents and bookmarks accordingly" , NULL );
8294+ s->internal_msg_buffer = body_factory->getFormat (8192 , &s->internal_msg_buffer_size , " %s <a href=\" %s\" >%s</a>. %s." ,
8295+ " The document you requested is now" , new_url, new_url,
8296+ " Please update your documents and bookmarks accordingly" , NULL );
82998297
83008298 h->set_content_length (s->internal_msg_buffer_size );
83018299 h->value_set (MIME_FIELD_CONTENT_TYPE, MIME_LEN_CONTENT_TYPE, " text/html" , 9 );
0 commit comments