http_parse_origin
if((ret=http_parse_origin(buf, pstate))!=0) {
if((ret=http_parse_origin(scratch_buffer, &pstate))!=0) {
if((ret=http_parse_origin(buf, pstate))!=0) {
if((ret=http_parse_origin(scratch_buffer, &pstate))!=0) {