Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Content-Type header is missing in $request->headers #1234

Closed
vladar opened this issue Jun 7, 2011 · 2 comments
Closed

Content-Type header is missing in $request->headers #1234

vladar opened this issue Jun 7, 2011 · 2 comments

Comments

@vladar
Copy link

vladar commented Jun 7, 2011

Looks like $request->headers->get('Content-Type') is always empty (web server sends it to PHP as $_SERVER['CONTENT_TYPE'] and symfony only writes $SERVER['HTTP...'] vars to headers bag)

@stloyd
Copy link
Contributor

stloyd commented Jun 7, 2011

(..) web server sends it to PHP as $_SERVER['CONTENT_TYPE'] (...)

Then you should use $request->server->get('Content-Type'), no ? ;-)

@vladar
Copy link
Author

vladar commented Jun 8, 2011

Yes, I could use it. But Content-Type is also a valid HTTP header, so why it is missing in "headers" bag?

@fabpot fabpot closed this as completed in f16e206 Jun 8, 2011
stloyd added a commit to stloyd/symfony that referenced this issue Jun 8, 2011
fabpot added a commit that referenced this issue Oct 16, 2015
… root (jaytaph, fabpot)

This PR was merged into the 2.3 branch.

Discussion
----------

[filesystem] makeRelativePath does not work correctly from root

| Q             | A
| ------------- | ---
| Bug fix?      | yes/no
| New feature?  | yes/no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #1234
| License       | MIT
| Doc PR        | #14066, #14067

When using `makeRelativePath`, it returns an incorrect path when trying to fetch an entry from the root:

      $fs->makePathRelative('/foo/bar/baz', '/');

Actual result:

      ../foo/bar/baz

Expected result:

      foo/bar/baz

As we have specified an absolute path, there is no point on having an `..` added. It works, because a root directory has a `..` which points to itself, but it could result in issues when the relative path is actually prefixed or concatted.

Commits
-------

791b124 fixed CS
7bb394e Added separated handling of root paths
nicolas-grekas added a commit that referenced this issue Jan 13, 2016
This PR was merged into the 2.3 branch.

Discussion
----------

[Yaml] Fix tests on PHP 7.0.2

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #1234
| License       | MIT
| Doc PR        | -

Related to https://bugs.php.net/66179 that has been fixed in 7.0.2

Commits
-------

902f6dd [Yaml] Fix tests on PHP 7.0.2
fabpot added a commit that referenced this issue Jan 25, 2016
This PR was merged into the 3.0 branch.

Discussion
----------

[Form] Remove unused private method

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | FormValidatorTest::testMissingConstraintIndex() failed, but not relevant
| Fixed tickets | #1234
| License       | MIT
| Doc PR        | -

In 3.0 there is no reference to the private [indent method](https://github.com/symfony/symfony/blob/3.0/src/Symfony/Component/Form/Form.php#L1149).

There was only [one reference in 2.8](https://github.com/symfony/symfony/blob/2.8/src/Symfony/Component/Form/Form.php#L843), but it has been removed.

Commits
-------

0fb1664 [Form] Remove unused private method
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

No branches or pull requests

3 participants