HTTP Status code

Deciphered - March 23, 2009 - 01:47
Project:Mobile Codes
Version:6.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active
Description

From: http://drupal.org/node/409958#comment-1386470
By: haggins

I wonder if there's a method to get the http status code of the nokia.com request. I think file_save_data() will create a file even when $image->data contains no image data. If so then this http code should be returned, too.

Thinking about all of it the return value should be an array:

<?php
return array(
 
'image' => theme('image', $file, $arguments['name'], $arguments['name'], NULL, FALSE),
 
'file' => $file,
 
'status' => $image->code,
);
?>

 
 

Drupal is a registered trademark of Dries Buytaert.