Skip to content

Commit

Permalink
fix bug: fetch multiple types of http request fields
Browse files Browse the repository at this point in the history
  • Loading branch information
Hackerl committed Nov 28, 2022
1 parent 67da9ee commit 4bff091
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion rasp/php/library.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ PHP_RINIT_FUNCTION (php_probe) {
if (!val)
return "";

return {Z_STRVAL_P(val), (std::size_t) Z_STRLEN_P(val)};
return toString(val);
};

strncpy(PHP_PROBE_G(request).scheme, fetch(Z_ARRVAL_P(server), "REQUEST_SCHEME").c_str(), SMITH_FIELD_LENGTH - 1);
Expand Down
2 changes: 1 addition & 1 deletion rasp/php/php/api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ std::string toString(
#endif
);

return "resource";
return zero::strings::format("resource(%s)", type);
}

default:
Expand Down

0 comments on commit 4bff091

Please sign in to comment.