Commit fba89f71 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Fix type-punning breakage

parent 4a3e1087
...@@ -622,6 +622,7 @@ static int httpd_RedirectCallBack( httpd_callback_sys_t *p_sys, ...@@ -622,6 +622,7 @@ static int httpd_RedirectCallBack( httpd_callback_sys_t *p_sys,
httpd_message_t *query ) httpd_message_t *query )
{ {
httpd_redirect_t *rdir = (httpd_redirect_t*)p_sys; httpd_redirect_t *rdir = (httpd_redirect_t*)p_sys;
char *p_body;
if( answer == NULL || query == NULL ) if( answer == NULL || query == NULL )
{ {
...@@ -633,7 +634,7 @@ static int httpd_RedirectCallBack( httpd_callback_sys_t *p_sys, ...@@ -633,7 +634,7 @@ static int httpd_RedirectCallBack( httpd_callback_sys_t *p_sys,
answer->i_status = 301; answer->i_status = 301;
answer->psz_status = strdup( "Moved Permanently" ); answer->psz_status = strdup( "Moved Permanently" );
answer->i_body = asprintf( (char **)&answer->p_body, answer->i_body = asprintf( &p_body,
"<?xml version=\"1.0\" encoding=\"ascii\" ?>\n" "<?xml version=\"1.0\" encoding=\"ascii\" ?>\n"
"<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" " "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" "
"\"http://www.w3.org/TR/xhtml10/DTD/xhtml10strict.dtd\">\n" "\"http://www.w3.org/TR/xhtml10/DTD/xhtml10strict.dtd\">\n"
...@@ -649,6 +650,7 @@ static int httpd_RedirectCallBack( httpd_callback_sys_t *p_sys, ...@@ -649,6 +650,7 @@ static int httpd_RedirectCallBack( httpd_callback_sys_t *p_sys,
"<hr />\n" "<hr />\n"
"</body>\n" "</body>\n"
"</html>\n", rdir->psz_dst ); "</html>\n", rdir->psz_dst );
answer->p_body = (unsigned char *)p_body;
/* XXX check if it's ok or we need to set an absolute url */ /* XXX check if it's ok or we need to set an absolute url */
httpd_MsgAdd( answer, "Location", "%s", rdir->psz_dst ); httpd_MsgAdd( answer, "Location", "%s", rdir->psz_dst );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment