WordPress.org

Make WordPress Core

Opened 7 years ago

Closed 6 years ago

Last modified 6 years ago

#8610 closed defect (bug) (fixed)

Plugin update API error, incorrect URL

Reported by: DD32 Owned by: mdawaffe
Milestone: Priority: normal
Severity: normal Version:
Component: WordPress.org site Keywords:
Focuses: Cc:

Description

In some cases, the package url for a version will be incorrect, Eg:

object(stdClass)[141]
  public 'id' => string '515' (length=3)
  public 'slug' => string 'wp-e-commerce' (length=13)
  public 'new_version' => string '3.6.8 RC3' (length=9)
  public 'url' => string 'http://wordpress.org/extend/plugins/wp-e-commerce/' (length=50)
  public 'package' => string 'http://downloads.wordpress.org/plugin/wp-e-commerce.3.6.8 RC3.zip' (length=65)

The package actually exists at:

http://downloads.wordpress.org/plugin/wp-e-commerce.3.6.8RC3.zip

note the missing space between 3.6.8 and RC3

Change History (4)

comment:1 @DD327 years ago

Just in addition to this, Seems the 404 urls' do not produce 404 responses, rather they're producing 501's:

array
  'headers' => 
    array
      'content-type' => string 'text/html' (length=9)
      'content-length' => string '28' (length=2)
  'body' => string 'This method may not be used.' (length=28)
  'response' => 
    array
      'code' => int 501
      'message' => string 'Not Implemented' (length=15)

(Thats from WP's HTTP API, I'm not sure why i dont see the same output in a browser though..)

comment:2 @mdawaffe6 years ago

  • Resolution set to fixed
  • Status changed from new to closed

The URLs should be correct now. What URL that you expect to get a 404 from do you get a 501?

comment:3 @DD326 years ago

What URL that you expect to get a 404 from do you get a 501?

http://downloads.wordpress.org/plugin/wp-e-commerce.3.6.8 RC3.zip was printing "404 not found" but the Headers were 501's, It seems like its corrected now though.

comment:4 @DD326 years ago

Oh, Seems the 404 error is still there, Use this exact code in a theme/plugin to see the result:

<?php

$url = 'http://downloads.wordpress.org/themes/something.zip';

$res = wp_remote_get($url);
var_dump($res);

?> 
array
  'headers' => 
    array
      'content-type' => string 'text/html' (length=9)
      'content-length' => string '18' (length=2)
      'date' => string 'Wed, 14 Jan 2009 10:36:37 GMT' (length=29)
      'server' => string 'LiteSpeed' (length=9)
      'connection' => string 'close' (length=5)
  'body' => string '404 File not found' (length=18)
  'response' => 
    array
      'code' => int 200
      'message' => string 'OK' (length=2)
Note: See TracTickets for help on using tickets.