You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
because dates may contain the "+" character for the timezone part when serialized.
Now, because in urls the "+" character is historically interpreted as a space, when timestamps like "2020-02-04T19:25:00+01:00" or "Tue Feb 4 2020 19:25:00 GMT+0100" are sent back to the server ASP.Net would decode them as "2020-02-04T19:25:00 01:00" or "Tue Feb 4 2020 19:25:00 GMT 0100". In both cases the Json deserializer won't recognize the string as a valid date, so the WebApi infrastructure will just pass null into the parameter (or send back a 404 in case the parameter didn't have a default value).
The text was updated successfully, but these errors were encountered:
This may be a corner case, but if you define a controller method like this one:
the typescript code generated by the built-in $Url directive is:
but it should really be:
because dates may contain the "+" character for the timezone part when serialized.
Now, because in urls the "+" character is historically interpreted as a space, when timestamps like "2020-02-04T19:25:00+01:00" or "Tue Feb 4 2020 19:25:00 GMT+0100" are sent back to the server ASP.Net would decode them as "2020-02-04T19:25:00 01:00" or "Tue Feb 4 2020 19:25:00 GMT 0100". In both cases the Json deserializer won't recognize the string as a valid date, so the WebApi infrastructure will just pass null into the parameter (or send back a 404 in case the parameter didn't have a default value).
The text was updated successfully, but these errors were encountered: