CSC/ECE 517 Fall 2014/oss M1456 kdv: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
No edit summary
Line 24: Line 24:


=='''Appendix'''==
=='''Appendix'''==
===''Setting up Servo''===
==='''Setting up Servo'''===
There are two main steps to set up the environment for this project. Linux environment is preferred for setting up the environment as it is simple and easy.
There are two main steps to set up the environment for this project. Linux environment is preferred for setting up the environment as it is simple and easy.



Revision as of 22:39, 27 October 2014

Implement MIME sniffing - spec

This article is about the open source project M 1456: Implement MIME sniffing - spec <ref>https://github.com/servo/servo/issues/3144</ref>, which is part of the Servo Parallel Browser Project. Here you can find a brief Background information about MIME sniffing in servo, rust programming language, the initial step and the first step implemented in the project.


Background Information

When an HTTP resource declares the type of its content (using the Content-Type header), it's very easy to decide how to present it - if it's an image, decode it; if it's an HTML page, parse and display it. When no such header is present, Servo currently falters (such as loading an image file from disk, as in #3131). We want to implement the "sniffing" specification, which looks at the starting byte content of the resource and guesses what manner of content is being received.

What is Servo?

Rust

Implement MIME sniffing

Initial Step

Build Servo. Learn about tasks in Rust, then spawn a new sniffer task in the load method in resource_task.rs, creating a sender and receiver pair as well - the task should read all available data from the new receiver, and send it immediately via the original sender, while the new sender gets handed off to the factory function that is executed. All web pages should continue to load unchanged after rebuilding.

Step 1

interpose a sniffer in every resource request in the load method in resouce_task.rs - make a new sender/receiver pair, spawn a task that waits for input on the new receiver and passes it on to the old sender, while handing off the new sender to the factory function.


Appendix

Setting up Servo

There are two main steps to set up the environment for this project. Linux environment is preferred for setting up the environment as it is simple and easy.

References

<references/>