-
Notifications
You must be signed in to change notification settings - Fork 2
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
Nope #1
Comments
Hello! Correct, this this isn't maintained - the symfony http classes that Laravel (you just need to generate the etag) On Monday, May 5, 2014, Maxime Fabre notifications@github.com wrote:
|
What do you mean? I'm doing this currently which kind of isn't the nicest thing I've ever done. Route::filter('etags', function($route, $request, $response) {
$responseEtag = md5($response->getContent());
$requestEtag = array_get($request->getETags(), 0);
$requestEtag = trim($requestEtag, '"');
// Set request as not modified if ETags match
if($requestEtag && $requestEtag == $responseEtag){
$response->setNotModified();
}
// Set ETag on response
$response->setEtag($responseEtag);
}); |
Laravel's The Request object in particular can help determine if a request isNotModified. Take a look around there and see what's available! |
This doesn't work on 4.1 because of the components required, is this still maintained or do you have another way to set ETags and such ?
The text was updated successfully, but these errors were encountered: