#2551 closed defect (bug) (fixed)
Redirected enclosures not quite there yet
Reported by: | aegrumet | Owned by: | markjaquith |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 2.0.1 |
Component: | General | Keywords: | bg|has-patch bg|commit |
Focuses: | Cc: |
Description
Hi there,
I noticed that WP wasn't following HTTP redirects when auto-detecting enclosures in the post body.
On further digging I found a commit for this on trunk (functions.php r2956) but in my testing, enclosures still aren't always detected. It looks like the bugfix just needs a little work (patch to follow).
To reproduce, try linking to
which is a one-liner that redirects to an mp3 file on my server. Then check the RSS feed for an enclosure. There should be one but it's not there.
Attachments (2)
Change History (10)
#1
@
18 years ago
Comments on the patchfile:
- No need to store $headersstatus_code?, a few lines down the same data is computed and stored in $headersresponse?. A quick grep of the tree didn't reveal any other instances of the string 'status_code', so presumably there are no side effects to stomping it back out (unless of course you like that name and want to get rid of 'response' everywhere ;) ).
- The preg_replace for $code wasn't returning sane results for me in any case. Not worth digging into if you agree with 1 above.
#2
@
18 years ago
Oh, and importantly, the existing code was going right back to the original url, not following the Location header. That's fixed in the patch.
#5
@
18 years ago
- Keywords bg|commit added; bg|needs-testing removed
- Milestone set to 2.0.3
- Owner changed from anonymous to markjaquith
- Status changed from new to assigned
Tested aegrumet's patch on /banches/2.0/ (2.0.3 pre-release) and it fixed the issue! Podcasting and videocasting are really taking off, and a lot of people are hosting at services that use redirection (e.g. CacheFly).
Double milestone for this one: 2.0.3 and 2.1, but 2.0.3 is more urgent.
Same code, should be easier to read