zendframework / zend-diactoros

PSR-7 HTTP Message implementation
BSD 3-Clause "New" or "Revised" License
1.56k stars 152 forks source link

ServerRequestFactory::fromGlobals() breaking on windows x64 #351

Closed dlepera closed 5 years ago

dlepera commented 5 years ago

Hey Guys. I have an Windows x64 PC and MAC OS X runing same project (in dev mode). On MAC OS X this app works fine! But on Windows dont :/

On windows, when I try run $server_request = ServerRequestFactory::fromGlobals(); got an InvalidArgumentException with message:

C:\inetpub\apps\dlepera88-php\painel-dlx\index.php:62:
object(Zend\Diactoros\Exception\InvalidArgumentException)[10]
  protected 'message' => string '"CommonProgramFiles(x86)" is not valid header name' (length=50)
  private 'string' (Exception) => string '' (length=0)
  protected 'code' => int 0
  protected 'file' => string 'C:\inetpub\apps\dlepera88-php\painel-dlx\vendor\zendframework\zend-diactoros\src\HeaderSecurity.php' (length=99)
  protected 'line' => int 168
  private 'trace' (Exception) => ... and trace is here

On windows machine the PHP is runing on IIS: iis version

What can I do?

michalbundyra commented 5 years ago

This is the same as #350 and all others since 2.0.2 release and PR #344. Please wait for the fixed version and meanwhile use 2.0.1.

dlepera commented 5 years ago

Ok, my friend. I will wait for hotfix... Thanks for ask

weierophinney commented 5 years ago

Fixed with versions 2.0.3 and 2.1.1.