rest - Paw returns wrong web page compared to browsers -
the requests appear sent wrong host (not entirely sure host they're being sent response can sent 4 different servers).
chrome returns right json response:
paw's nsurlconnection
library :
but default paw http library
returns 404 not found :
you have 2 local servers listening on port 8000, 1 listens ipv6 connections (note: it's default php apps) , 1 listening ipv4 connections.
when connect "localhost" don't specify ip protocol want use, , sounds clients (including chrome, asihttprequest , nsurlconnection in paw) choose connect ipv6 first. whereas paw http library chooses connect ipv4 (we made choice ipv4 still used, , wanted avoid bugs as possible).
so when run main web app specifying localhost:8000
server (php in case) listens [::1]:8000
(which ipv6 equivalent 127.0.0.1:8000
), , guess other server listens actual ipv4 127.0.0.1:8000
. chrome , other libraries connect [::1]:8000
(ipv6) , main php application, whereas "paw http library" connect 127.0.0.1:8000
(ipv4) hits other server, returns 404 can see in video.
what need specify actual ip instead of localhost
. use http://[::1]:8000/plans
connect main app listens ipv6.
Comments
Post a Comment