URL correction request
Request type
- [x] Please close this issue, I accidentally submitted it without adding any details
- [ ] New documentation
- [x] Correction or update
Details
The url of this page is not correct. https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Operators/async允许声明一个函数为一个包含异步操作的函数
It should be like this one. This url will redirect to the above url. werid... https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Operators/async_function
Hrm, this is strange indeed.
I can't fix the redirect either. When I go to https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Operators/async_function$edit, it gives me a 404 error.
Any thoughts @peterbe or @escattone ?
That is strange indeed. I appreciate why you'd get a 404 when trying to edit because the locale/slug combo does not exist:
>>> Document.all_objects.filter(locale='zh-CN', slug__istartswith='Web/JavaScript/Reference/Operators/async_')
<QuerySet []>
(note the use of .all_objects so it doesn't matter if it's deleted or not)
Now, that's no different from if it was /zh-CN/docs/gc70169ed627h521a98g1e9e5fb60d.
So, how on earth does this redirect?!
▶ curl -v https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Operators/async_function > /dev/null
...
> GET /zh-CN/docs/Web/JavaScript/Reference/Operators/async_function HTTP/2
> Host: developer.mozilla.org
> User-Agent: curl/7.64.1
> Accept: */*
>
* Connection state changed (MAX_CONCURRENT_STREAMS == 128)!
< HTTP/2 302
< content-type: text/html; charset=utf-8
< content-length: 0
< access-control-allow-origin: *
< cache-control: public, max-age=0, s-maxage=300
< content-language: zh-CN
< date: Wed, 06 May 2020 18:00:32 GMT
< etag: "d41d8cd98f00b204e9800998ecf8427e"
< location: /zh-CN/docs/Web/JavaScript/Reference/Operators/async%E5%85%81%E8%AE%B8%E5%A3%B0%E6%98%8E%E4%B8%80%E4%B8%AA%E5%87%BD%E6%95%B0%E4%B8%BA%E4%B8%80%E4%B8%AA%E5%8C%85%E5%90%AB%E5%BC%82%E6%AD%A5%E6%93%8D%E4%BD%9C%E7%9A%84%E5%87%BD%E6%95%B0
< server: meinheld/1.0.1
< strict-transport-security: max-age=63072000
< x-content-type-options: nosniff
< x-frame-options: DENY
< x-xss-protection: 1; mode=block
< vary: Cookie
< x-cache: Hit from cloudfront
< via: 1.1 f4710a63efd91d46133023148eb02e4e.cloudfront.net (CloudFront)
< x-amz-cf-pop: ATL56-C2
< x-amz-cf-id: QYGvEtny75feogHYKwvCWayucVeE9XgfLEIalu6QwmVkEm9FdCWhrg==
< age: 22
<
{ [0 bytes data]
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
* Connection #0 to host developer.mozilla.org left intact
* Closing connection 0
Same with HEAD requests by the way:
▶ curl -I https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Operators/async_function
HTTP/2 302
content-type: text/html; charset=utf-8
content-length: 0
access-control-allow-origin: *
cache-control: public, max-age=0, s-maxage=300
content-language: zh-CN
date: Wed, 06 May 2020 18:00:32 GMT
etag: "d41d8cd98f00b204e9800998ecf8427e"
location: /zh-CN/docs/Web/JavaScript/Reference/Operators/async%E5%85%81%E8%AE%B8%E5%A3%B0%E6%98%8E%E4%B8%80%E4%B8%AA%E5%87%BD%E6%95%B0%E4%B8%BA%E4%B8%80%E4%B8%AA%E5%8C%85%E5%90%AB%E5%BC%82%E6%AD%A5%E6%93%8D%E4%BD%9C%E7%9A%84%E5%87%BD%E6%95%B0
server: meinheld/1.0.1
strict-transport-security: max-age=63072000
x-content-type-options: nosniff
x-frame-options: DENY
x-xss-protection: 1; mode=block
vary: Cookie
x-cache: Hit from cloudfront
via: 1.1 2d26ba7e90592f6aaf3e7940a7088a63.cloudfront.net (CloudFront)
x-amz-cf-pop: ATL56-C2
x-amz-cf-id: z_ljFBiMzsWNlUKa05Ccbl2U4WNQe68PwP5b0ZsJJk5RROh8BDa-ZA==
age: 113
It's not like it's deleted or something like that:
>>> DocumentDeletionLog.objects.filter(locale='zh-CN', slug__istartswith='Web/JavaScript/Reference/Operators/async_function')
<QuerySet []>
Perhaps @escattone has a better theory of how that could happen. If it was something getting stuck in the CDN it just seems so strange because it's been way too long now for the CDN to hang on to it.
Also, I have a pretty fresh copy of the MySQL and I'm seeing this:
mysql> SELECT `wiki_document`.`id`, slug FROM `wiki_document` WHERE (`wiki_document`.`locale` = 'zh-CN' AND `wiki_document`.`slug` LIKE 'Web/JavaScript/Reference/Operators/a%');
+--------+------------------------------------------------------------------------------------------------------+
| id | slug |
+--------+------------------------------------------------------------------------------------------------------+
| 132551 | Web/JavaScript/Reference/Operators/Arithmetic_Operators |
| 111857 | Web/JavaScript/Reference/Operators/Array_comprehensions |
| 125951 | Web/JavaScript/Reference/Operators/Assignment_Operators |
| 199130 | Web/JavaScript/Reference/Operators/async允许声明一个函数为一个包含异步操作的函数 |
| 199606 | Web/JavaScript/Reference/Operators/await |
+--------+------------------------------------------------------------------------------------------------------+
5 rows in set (0.00 sec)
WHAT?! Not 20 min later I run it again (I copied the curl from above):
▶ curl -I https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Operators/async_function
HTTP/2 404
content-type: text/html; charset=utf-8
content-length: 29831
cache-control: max-age=0, no-cache, no-store, must-revalidate
content-language: zh-CN
date: Wed, 06 May 2020 18:28:38 GMT
expires: Wed, 06 May 2020 18:28:38 GMT
server: meinheld/1.0.1
strict-transport-security: max-age=63072000
x-content-type-options: nosniff
x-frame-options: DENY
x-xss-protection: 1; mode=block
vary: Accept-Encoding,Cookie
x-cache: Error from cloudfront
via: 1.1 fd09c5c8b7a01c40409708bf025b9228.cloudfront.net (CloudFront)
x-amz-cf-pop: ATL56-C2
x-amz-cf-id: 1Rl5dU-uOTfwlj59FuxV3O6sVBA4vnKFp1LfHGLnVVHux5X0up6cpg==
Cloudfront much?
This has meanwhile been fixed.