Pascal MartinQuelques livres lus en 2018 (21.2.2019, 00:00 UTC)
Deux mois en retard, j’ai fait le tour des livres que j’ai lus en 2019. J’en ai déjà recommandé plusieurs autour de moi et, en parcourant mes lectures de ces derniers mois, j’en ai vu d’autres dont je n’ai jamais parlé mais qui étaient tout aussi intéressants. Voici donc quelques livres que j’ai lus en 2018 et que je recommande. Why we sleep — Matthew Walker Pour commencer, Why we sleep est un livre très intéressant sur le sommeil (j’avais écrit un article à ce sujet il y a un moment, d’ailleurs).
Link
Brandon SavageIt depends (20.2.2019, 13:00 UTC)

When I was younger, I had strong opinions about many subjects. I felt I was right about a great many things, and anyone who disagreed with me was wrong. In my mind there was a right or a wrong, a black and a white, with little room for grey. Others were certainly entitled to their […]

The post It depends appeared first on BrandonSavage.net.

Link
Evert Pot412 Precondition Failed (19.2.2019, 15:00 UTC)

In HTTP it’s possible to do conditional requests. These are requests that only execute if the right conditions are met.

For GET requests, this might be done to only retrieve the resource if it has changed. For those cases 304 Not Modified is returned.

For other cases, 412 Precondition Failed is returned.

Examples

This client only wants the PUT request to succeed, if it didn’t already exit:

PUT /foo/new-article.md HTTP/1.1
Content-Type: text/markdown
If-None-Match: *

This request is an update, and it should only succeed if the article hasn’t change since last time.

PUT /foo/old-article.md HTTP/1.1
If-Match: "1345-12315"
Content-Type: text/markdown

If the condition didn’t pass, it returns:

HTTP/1.1 412 Precondition Failed
Content-Type: text/plain

The article you're tring to update has changed since you last seen it.

One great advantage of this is that prevents lost updates, due to multiple people writing to the same resource. This is also known as the ‘lost update’ problem.

Using the Prefer header, it’s possible for a client to get the current state of the resource, in case the local copy was outdated. This saves a GET request.

PUT /foo/old-article.md HTTP/1.1
If-Match: "1345-12315"
Content-Type: text/markdown
Prefer: return=representation

### Article version 2.1

HTTP/1.1 412 Precondition Failed
Content-Type: text/markdown
Etag: "4444-12345"
Vary: Prefer

### Article version 3.0

This is useful, but it should probably have been designed with a HTTP/2 Push message instead. Nevertheless, there’s no harm in adopting this for legacy HTTP/1.1 systems.

References

Link
Voices of the ElePHPantITBT – Speakers (16.2.2019, 19:17 UTC) Link
larry@garfieldtech.comWhen I started writing PHP... (13.2.2019, 01:46 UTC)
When I started writing PHP...

I don't know exactly when I started writing PHP. It was shortly after the start of my second quarter of my freshman year of college, when a newly-met friend of mine introduced me to PHP as an easier to understand alternative to Perl. That puts it, I think, somewhere in January or February of 1999.

20 years ago, give or take a week. I have been writing PHP for two decades. That's more than half my lifetime. I feel old.

I thought it would be amusing (mostly at my expense) to look back a bit on just how much the PHP world has changed in the last two decades.

Larry 12 February 2019 - 7:46pm
Link
Evert Pot411 Length Required (12.2.2019, 15:00 UTC)

Most HTTP requests that have a request body, will also have a Content-Length header indicating how big the body will be. However, this is optional for some cases, such as when Chunked Transfer Coding is used.

It’s useful for a client to not include a Content-Length header for a few different cases. For instance, a client might send a HTTP request body based on a stream.

If a server does not support this feature, it can indicate this by sending back 411 Length Required.

In a situation like this, a recourse a client might have is to buffer the entire request to determine the real length.

Example

HTTP/1.1 411 Length Required
Content-Type: text/html
Server: curveball/0.6.0

<h1>This server requires a Content-Length</h1>

References

Link
thePHP.ccHelp! My tests stopped working. (12.2.2019, 07:00 UTC)
Link
PHP: Hypertext PreprocessorPHP 7.3.2 Release Announcement (7.2.2019, 00:00 UTC)
The PHP development team announces the immediate availability of PHP 7.3.2. This is a bugfix release, with several bug fixes included.All PHP 7.3 users are encouraged to upgrade to this version.For source downloads of PHP 7.3.2 please visit our downloads page, Windows source and binaries can be found on windows.php.net/download/. The list of changes is recorded in the ChangeLog.
Link
PHP: Hypertext PreprocessorPHP 7.2.15 Released (7.2.2019, 00:00 UTC)
The PHP development team announces the immediate availability of PHP 7.2.15. This is a bugfix release.All PHP 7.2 users are encouraged to upgrade to this version.For source downloads of PHP 7.2.15 please visit our downloads page, Windows source and binaries can be found on windows.php.net/download/. The list of changes is recorded in the ChangeLog.
Link
Evert Pot410 Gone (5.2.2019, 15:00 UTC)

410 Gone is a status code that can be used in cases where a resource is gone and never coming back. It’s a more specific version of 404 Not Found.

A good example for using 410 instead of 404 is when a resource was intentionally removed.

Using 410 can be helpful, because it signals to other people linking to you that the link is dead and should be removed. A 404 is the default for missing resources, and it can just mean that the owner of the site has moved the content and didn’t put the right redirects in place.

So to sum it up: 410 implies intent.

Example

HTTP/1.1 410 Gone
Content-Type: text/plain
Server: curveball/0.6.0

I deleted it and it's never coming back!

References

Link
LinksRSS 0.92   RDF 1.
Atom Feed   100% Popoon
PHP5 powered   PEAR
ButtonsPlanet PHP   Planet PHP
Planet PHP