projects
/
yaffs-website
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Pull merge.
[yaffs-website]
/
web
/
core
/
lib
/
Drupal
/
Core
/
StackMiddleware
/
NegotiationMiddleware.php
diff --git
a/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php
b/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php
index e3864610f4f96013abb73064398e1e75a396ce2a..f246cce4624e1bd9d5df10c4ee4f344257ac77c3 100644
(file)
--- a/
web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php
+++ b/
web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php
@@
-46,7
+46,9
@@
class NegotiationMiddleware implements HttpKernelInterface {
}
// Determine the request format using the negotiator.
}
// Determine the request format using the negotiator.
- $request->setRequestFormat($this->getContentType($request));
+ if ($requested_format = $this->getContentType($request)) {
+ $request->setRequestFormat($requested_format);
+ }
return $this->app->handle($request, $type, $catch);
}
return $this->app->handle($request, $type, $catch);
}
@@
-88,8
+90,8
@@
class NegotiationMiddleware implements HttpKernelInterface {
return $request->query->get('_format');
}
return $request->query->get('_format');
}
- //
Do HTML last so that it always wins
.
- return
'html'
;
+ //
No format was specified in the request
.
+ return
NULL
;
}
}
}
}