It seems only the first %3F gets un-encoded. Remaining %3F remains as it is... Could it be a bug? Posted at Nginx Forum: http://forum.nginx.org/read.php?2,229436,229469#msg-229469