Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@iatmakdotcx
Copy link

it's not a rest call if request.PathInfo is empty

Fixes #12203, #12424

it's not a rest call if request.PathInfo is empty
@marek-safar
Copy link
Member

build

return;
Type pageType = currentHandler.GetType ();
if (typeof (Page).IsAssignableFrom (pageType) && !String.IsNullOrEmpty (contentType) && contentType.StartsWith ("application/json", StringComparison.OrdinalIgnoreCase)) {
if (typeof (Page).IsAssignableFrom (pageType) && !String.IsNullOrEmpty (request.PathInfo) && contentType.StartsWith ("application/json", StringComparison.OrdinalIgnoreCase)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if the contentType is null?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's impossible! in HttpRequest.ContentType has been checked.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@steveisok
Copy link
Contributor

@iatmakdotcx Once #12619 lands, this will be fixed up with it.

@steveisok steveisok closed this Jun 3, 2019
stretyak added a commit to PowerMeMobile/mono that referenced this pull request Jun 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Non-web exception. Exception origin (name of application or object): mscorlib.

3 participants